Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Problem with ATmega32 TQFP

(you are viewing a thread; or go back to list of threads)

Problem with ATmega32 TQFP (by Ziggy)
I am using ATmega32 in a 44 pin TQFP package.

I know ..I know .. LDMICRO supports only ATmega32 in a 40 pin DIP package.

Well there is no difference between the two packages such as say the ATmega328 product where one package does not have all the pins the other package has.

SO irrespective of external pin numbering one ought to be able to compile the ladder for ATmega32 silicone and ensure pin functional labels are observed rather than pin numbers .

And so it begins.... I have followed above logic with ATmega8 and ATmega328 ( minus a couple of pins ) with good success.

I applied the same reasoning to ATmega32 with partial success.

The application employs almost all of ATmega 32 pins ( a few pins only to spare).

I am having a problem with a very simple task ( see attached file ) where seven pins are input pins, driven by a dip switch ( inputs are pulled down by a 1Kohm resistor and switches pull inputs high).

Of the seven inputs four are working as expected, three seem to be deaf.

Initially I thought i had damaged input pins so i replaced themicro. No... the problem did not go away and yes the pins see the switches. Pin voltage toggles with the switch.

Pins in question
PC3
PC4
PC5
PC6
PC7
PA7 and
PA6

The first three dont want to play.

Please comment..
Fri May 11 2018, 00:18:13, download attachment switchtest.ld
(no subject) (by Ziggy)
To confirm ... the simulation meets the expectations
Fri May 11 2018, 00:42:10
(no subject) (by Ziggy)
Additional information.

Just ran the same code on 40 pin DIP package ( using the old STK500 board ).

Kind of happy to report same issues on the 40 pin DIP package.

There may be a problem with the compiled hex code.
Fri May 11 2018, 01:54:27
(no subject) (by Ihor Nehrutsa)
to Ziggy
Check JTAGEN fuse.

TDO – Port C, Bit 4
TDO, JTAG Test Data Out: Serial output data from Instruction Register or Data Register. When
the JTAG interface is enabled, this pin can not be used as an I/O pin.
Fri May 11 2018, 03:26:26
(no subject) (by Ziggy)
Thank You Ihor,

I had used ATmega16 about 10 years ago and that was the normal fare... disable the JTAG interface free up four I/O pins.

I simply forgot after so many years of not using it.

It was simple enough to remedy Atmel Studio 4 and STK500.

Again much obliged.
Fri May 11 2018, 21:11:16
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):