AVR Port G

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi folks,

    i am working with an ATMEGA12816AI. I have some problems using the pins
of PORT G  as normal I/O. It seems that the Mega128 doesn't want to turn the
ALE,WR,RD,TOSC1 and TOSC2 pins as normal I/O. I am sure that the processor
isn't i M103 compatibility mode because the code perform a MUL instruction
(and i test the result with a JTAG debugger). On the datasheet Atmel writes
that the processor will use the pins of PORT G for special function ONLY if
activated, alias the AS0 bit in ASSR for PG4/PG3 and the SRE bit in MCUCR
for PG0/PG1/PG2. After a reset those peripherals are disabled.

      Any suggestion ?

Re: AVR Port G
Quoted text here. Click to load it
Where you found information that mul instruction doesn't work on the
mega128 in the mega103 comaptibility mode?

Did you read the extended fuse byte and look at M103C value?

Artur Lipowski

Re: AVR Port G

When i read  "JTAG ICE->Fuses" in AVR studio 4.08, it show the following
fuses programmed:

ATmega103 Compatibility Mode (M103C=0)
On-Chip Debug Enabled (OCDEN=0)
JTAG Interface Enabled (JTAGEN=0)
Serial program downloading (SPI) enabled (SPIEN=0)
... and other fuses about the boot flash size, brown out detection and clock

so i thought that it means "if M103C is equal to 0 then ATmega103
Compatibility mode is active".

I WAS WRONG. (and the datasheet show it in table 118 on page 289)

Moreover, i thought that Atmel ship their Mega128 ready to go for what they
are. I was wrong again. You have to unprogram M103C fuse to enable the new
pins features.

Finally, the "Mega103 compatibility mode" doesn't regard the instruction

Many thanks Artur.

Quoted text here. Click to load it

Site Timeline