11 Jan 2002 hudson   » (Master)

I'm still trying to get the AVR Mega163's onboard ADC to sample data from the onboard gyros but have no luck.

The source code worked on the At Mega103 STK200 development board, but the interrupts never get triggered on the Mega163 on our custom board. I've confirmed that there is voltage at AVcc and the input voltages are there.

On a related question, if I want to use the internal 2.56V voltage reference what is the correct wiring for the "bypass capacitor on Aref"? I can't find anything in the data sheet that specifies the capacitor size or wiring.

My post to the mailing list summed up the status with these points:

The good news:

  • We have the UART and RS-232 problem fixed, although with an enormous mess of jumpers.

  • The accelerometer sampling is working great with the one ADXL202-EB that is installed. It is backwards from the design, but working.

  • The ISP (In system programmer) is functioning well.

  • The power and programming LEDs work.

The bad news:

  • One Mega163 is hosed. I tried configuring it to use the external crystal and is toasted. I haven't figured out how to fix it, nor have I been able to find a reference for setting the fuse bits.

  • We're using the internal 1.0 Mhz clock sped up to 2.0 Mhz now. It is very unstable with temperature and sometimes causes UART timing errors. As well as accelerometer sampling problems...

  • The ADC is not working. If I select the internal voltage reference the ADC never generates an interrupt. If I use Aref then I get interrupts and samples are made. When the spec sheet says "connect a bypass capacitor to Aref" to use the internal reference, what does that mean?

The code checked in to onboard/avr will built a program named sample that reads the one accelerometer and attempts to read all eight analog ports. It prints the ten data values and the current time to the serial port at 19.2 kbaud.

Latest blog entries     Older blog entries

X
Share this page