by KurtE » Wed May 24, 2006 5:17 am
by KurtE
Wed May 24, 2006 5:17 am
I tried again today to connect a Deventech SRF10 Range Finder to my RN-1. This requires I2C, so I have been attempting to convert some C code that I had running on a robot that is based on an AVR16 microcontroller. However since I can not use the native support for I2C that is on this chip through RoboBasic, I ended up trying to do it bit by bit.
So far I am not having much luck
. Has had any success using any I2C devices on their RN-1?
Does anyone know if the SDL/SCL lines that are labeled on the board already have pull-up resistors installed on them or not? Also does anyone know what their IO port numbers are? Also does anyone know if HiTec is using I2C for anything else on the board?
I know there is some sample code in the RN-1 user’s manual on page 93, however looking closely at it, I have my doubts if this code fragment would work. In this fragment it says that SCL=22 and SDA=23. With a couple of iterations of my code, I started to have some Servos jitter. That made me wonder if the IO Ports were wrong. The documentation mentioned that there 40 IO ports, so my assumption that 24 of them or the servos, 8 were the ATOD ports and the other 8 would probably be the 8 lines upper left including SCL and SDA, does this make sense? Something like:
IO PORTS
Servos 0-23 0-23
SCL 24
SDA 25
PWM0 26
Pwm1 27
Pwm2 28
LCD 29
ERX 30
ETX 31
ATOD0-7 32-39
I wonder what their code fragment is trying to do. It looks like it is outputting a 4 bit address over SDA, probably the last bit is an R/W bit and then it reads in a byte from the slave from least significant bit to most significant bit. But this does not look like any standard I2C communication. Has anyone else made any better sense of this?
Sorry for just rambling on here
.
I tried again today to connect a Deventech SRF10 Range Finder to my RN-1. This requires I2C, so I have been attempting to convert some C code that I had running on a robot that is based on an AVR16 microcontroller. However since I can not use the native support for I2C that is on this chip through RoboBasic, I ended up trying to do it bit by bit.
So far I am not having much luck
. Has had any success using any I2C devices on their RN-1?
Does anyone know if the SDL/SCL lines that are labeled on the board already have pull-up resistors installed on them or not? Also does anyone know what their IO port numbers are? Also does anyone know if HiTec is using I2C for anything else on the board?
I know there is some sample code in the RN-1 user’s manual on page 93, however looking closely at it, I have my doubts if this code fragment would work. In this fragment it says that SCL=22 and SDA=23. With a couple of iterations of my code, I started to have some Servos jitter. That made me wonder if the IO Ports were wrong. The documentation mentioned that there 40 IO ports, so my assumption that 24 of them or the servos, 8 were the ATOD ports and the other 8 would probably be the 8 lines upper left including SCL and SDA, does this make sense? Something like:
IO PORTS
Servos 0-23 0-23
SCL 24
SDA 25
PWM0 26
Pwm1 27
Pwm2 28
LCD 29
ERX 30
ETX 31
ATOD0-7 32-39
I wonder what their code fragment is trying to do. It looks like it is outputting a 4 bit address over SDA, probably the last bit is an R/W bit and then it reads in a byte from the slave from least significant bit to most significant bit. But this does not look like any standard I2C communication. Has anyone else made any better sense of this?
Sorry for just rambling on here
.