Forums

ATmega128 Questions

Started by Tim Wescott July 14, 2016
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
http://www.wescottdesign.com

I'm looking for work -- see my website!
On Thu, 14 Jul 2016 13:13:47 -0500, Tim Wescott wrote:
[ ... ]
> * There's something in the data sheet about an ATmega103 compatibility > fuse -- what's the state of this fuse coming out of the box?
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.
On Thursday, July 14, 2016 at 11:13:56 AM UTC-7, Tim Wescott wrote:
> 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).
Did you check the JTAGEN fuse from SPI? Some app might disable JTAG to reuse pins for other things.
On Thu, 14 Jul 2016 13:13:47 -0500, Tim Wescott wrote:

> 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.
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 http://www.wescottdesign.com I'm looking for work -- see my website!