Re: [Flashforth-devel] Problem with I2C on ATMEGA328P
Brought to you by:
oh2aun
From: Mikael N. <mik...@fl...> - 2017-05-10 20:20:04
|
Hello Mark, You need to register to use the mailing list. Anyway, on my Arduino Uno the i2c.detect works just fine with an empty I2C bus when there are external pullups on SDA and SCL. Use i2c.init first. I don't have any real i2c devices handy right now. I wonder, is there any way to use the internal port C pullups for I2C. Although I suspect the internal pull-ups would be too weak to be of any use. BTW, are you using the latest FF hex images and doloop.txt from 11.4.2017 ? doloop was broken for a while before that. ok<$,ram> i2c.init i2c.detect 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 : -- -- -- -- -- -- -- -- -- 10 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60 : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70 : -- -- -- -- -- -- -- -- ok<$,ram> BR Mikael On 2017-05-10 20:05, Mark Wills wrote: > Hello, > > The routine i2c.wait in i2c-base-avr.txt hangs the machine. > > : i2c.wait ( -- ) \ Wait for operation to complete > \ When TWI operations are done, the hardware sets > \ the TWINT interrupt flag, which we will poll. > begin TWCR c@ mTWINT and until > ; > > I'm trying to use the i2c.detect program in the FlashForth guide (PDF) > to detect my i2c devices. I can see them just fine if I use a C++ > program so I know the hardware is wired correctly. > > Regards > > Mark Wills > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel -- -- Mikael |