Thursday, 10 November 2011

I2C links Arduino and Beagleboard - step 3

A lot of useful work today, and a valuable discovery, but I haven't quite got to where I want to be yet.

I'm trying to use an Atmel ATMega8 on a DT107 board from Dontronics as the middleman, sitting between the BeagleBoard and the LCD display I want to drive.

It took a while to wire up the DT107 to the LCD. To find out about what connects to what, I had to look at  the Oomlout instructions, an Arduino Pinout, the ATMega pinout, the DT107's schematic and the layout of the SimmBus.

I'm fairly sure I've got the connections correct but the Beagleboard is complaining about an error on the I2C bus. That part of the wiring is easy to check, so I think the probblem is more fundamental.

The DT107 board I'm using has an ATMega8 with an 8Mhz crystal. It just may not be able to run I2C at 400kHz, which is what the BeagleBoard I2C-2 interface uses.

On the plus side, I discovered that you can use the Arduino development environment with an ISP to program a sketch directly onto an AVR. So there's no need to install a bootloader! That simplifies things considerably. I'm using a USBTinyISP from adafruit; it's supported by AVRDude, which Arduino uses under the covers, and they work really well together.

The only gotcha to beware of is that the ISP puts 5v on the board's Vcc, so you need to be careful to isolate the DT107 board from the Beagleboard when programming the AVR.

Tomorrow I'll solder up another DT107 with a 16MHz crystal and an ATMega328. If I've got the wiring from board to LCD correct, we should be away to the races.

No comments:

Post a Comment