ATmega128 Questions

So, I'm sitting here making very poor progress on some customer hardware.

It's using an ATmega128, because it's an upgrade to an existing product. I'm having NO END of trouble trying to get this damned thing working. I think that I need some suggestions from someone who's been down this road before.

So, in no particular order, because I'm lost, here:

  • Toolset is Atmel Studio 7, using an AVR Dragon board

  • I couldn't get JTAG debugging to work. I don't know what magic finger-ring combination I missed out on, but I ended up just using the SPI programming interface (PE0, PE1, and PB1).

  • I'm currently stalled on just getting USART1 to emit CHARACTERS, by god.

  • There's something in the data sheet about an ATmega103 compatibility fuse -- what's the state of this fuse coming out of the box?

  • I'm trying to run things in the simulator, and writes to the USART1 control registers don't seem to be having any effect -- is this reflecting something real in the chip, or is it a simulator bug?

I could whine on, but if any of the above strikes any sparks, please comment -- particularly if you've had problems that have been solved.

--
Tim Wescott 
Wescott Design Services 
 Click to see the full signature
Reply to
Tim Wescott
Loading thread data ...

On Thu, 14 Jul 2016 13:13:47 -0500, Tim Wescott wrote: [ ... ]

Acccording to Atmel's doc2467.pdf, Rev. 2467X?AVR?06/11, the M103C fuse has a default value of "0 (programmed)" under Memory Programming -> Fuse Bits. That seems to mean that 103 compatibility is in force, per page 5, ATmega103 Compatibility Mode.

I sure didn't have that much trouble using the STK500 and AVR Dudes' toolchain, but it was a long time ago, and I have no clear recollection of what did happen.

Mel.

Reply to
Mel Wilson

Did you check the JTAGEN fuse from SPI? Some app might disable JTAG to reuse pins for other things.

Reply to
edward.ming.lee

Got things working now, for the moment. Thanks all.

JTAG still doesn't work, simulation still doesn't work, but I've got serial working, and I can program & test using burn & turn.

--
Tim Wescott 
Wescott Design Services 
 Click to see the full signature
Reply to
Tim Wescott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.