<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Verdana size=2>Hi Everybody,</FONT></DIV>
<DIV><FONT face=Verdana size=2>Just feedback - Your suggestion of disabling the
JTAG fuse bit solved the problem</FONT></DIV>
<DIV><FONT face=Verdana size=2>The fact default = JTAG enable fuse bits =
0x99e1</FONT></DIV>
<DIV><FONT face=Verdana size=2>Disable JTAGEN new fuse bit setting 0xd9e1 =
makes PORTC generic IO</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Thanks for your feedback, it helps a
lot!</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Regards,</FONT></DIV>
<DIV><FONT face=Verdana size=2>Gerhard Laubscher<BR>Electronic Engineer
(Comms Officer)<BR>SANAE 47 OverWinter Team<BR>SANAE iv Base (71o40' S /
2o51' W) Check-out SANAE Base on Google Earth!!<BR>Antarctica<BR>Tel :
+27-21-405 9428/29 Fax : +27-21-405 9432 (std
rates)<BR>SattPhone : 008816 315 467 74 HF : 6.210
Mhz<BR>Skype : gerhardjl<BR>email : <A
href="mailto:gerhard.laubscher@sanae.sanap.ac.za">gerhard.laubscher@sanae.sanap.ac.za</A><BR>website
: <A
href="http://www.sanap.org.za/sanae_team.html">www.sanap.org.za/sanae_team.html</A><BR></FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=amsol@amssolutions.co.za
href="mailto:amsol@amssolutions.co.za">Gerhard at AMS</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=icc-avr@imagecraft.com
href="mailto:icc-avr@imagecraft.com">Discussion list for ICCAVR and ICCtiny
Users. You do NOT needtosubscribeto icc-announce if you are a member of
this.</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, May 08, 2008 2:29
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Icc-avr] help : Mega16
PORTC</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Verdana size=2>Hi,</FONT></DIV>
<DIV><FONT face=Verdana size=2>Fuse settings read with icc = 0x99e1 which
confirms the default fact settings</FONT></DIV>
<DIV><FONT face=Verdana size=2>accd to the Atmel d/s. This then confirms
that the JTAGEN=0, which means</FONT></DIV>
<DIV><FONT face=Verdana size=2>that it is enabled, according to d/s.
Accd to your suggestions, I should disable</FONT></DIV>
<DIV><FONT face=Verdana size=2>the JTAG fuse bit, thus JTAGEN=1
thus the new code > 0xd9e1</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Using icc prgming inteface > Fuse bits R W
</FONT></DIV>
<DIV><FONT face=Verdana size=2>using R feature i confirm reading
> 0x99e1 =default=correct</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>To disable JTAGEN, the code should be 0xd9e1
?</FONT></DIV>
<DIV><FONT face=Verdana size=2>When I now change code for fusebits to 0xd9e1
(in window)</FONT></DIV>
<DIV><FONT face=Verdana size=2>and funct Fuse bits W to write</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>When I power off/on and Fuse bits R i get
0x00e1</FONT></DIV>
<DIV><FONT face=Verdana size=2> I expected 0xd9e1</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>I am confused, what am I doing
wrong,plse?</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Thx,</FONT></DIV>
<DIV><FONT face=Verdana size=2>Gerhard Laubscher<BR>Electronic Engineer
(Comms Officer)<BR>SANAE 47 OverWinter Team<BR>SANAE iv Base (71o40' S /
2o51' W) Check-out SANAE Base on Google Earth!!<BR>Antarctica<BR>Tel :
+27-21-405 9428/29 Fax : +27-21-405 9432 (std
rates)<BR>SattPhone : 008816 315 467 74 HF :
6.210 Mhz<BR>Skype : gerhardjl<BR>email : <A
href="mailto:gerhard.laubscher@sanae.sanap.ac.za">gerhard.laubscher@sanae.sanap.ac.za</A><BR>website
: <A
href="http://www.sanap.org.za/sanae_team.html">www.sanap.org.za/sanae_team.html</A><BR></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=j_baraclough@zetnet.co.uk
href="mailto:j_baraclough@zetnet.co.uk">John Baraclough</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=icc-avr@imagecraft.com
href="mailto:icc-avr@imagecraft.com">Discussion list for ICCAVR and ICCtiny
Users. You do NOT need tosubscribe to icc-announce if you are a member of
this.</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, May 08, 2008 1:18
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Icc-avr] help : Mega16
PORTC</DIV>
<DIV><FONT face=Verdana size=2></FONT><BR></DIV>It sounds like JTAG is
enabled. What are your fuse settings?<BR><BR>John<BR><BR>Gerhard at AMS
wrote:<BR>> Hi Everybody,<BR>> A simple question....<BR>>
<BR>> CPU : Mega 16 pdip (5VCC) (VCC=AVCC)<BR>> ICC
Compiler : V6.28 Built Apr 29 2k3 17:49:25
<BR>>
(Yes Richard, old, but good workhorse for my apps <BR>> and paid for...
:) )<BR>> <BR>> Port Connection > PC[0..7]
configured as input with PU ena, ttl <BR>> load connected<BR>>
<BR>> Problem> PC4 (TDO) remains hi-impedance, even though PU
enabled. I <BR>> found reading<BR>> a value from this port
(PINC) result in incorrect readValues.<BR>> <BR>> header file
<iom16v.h><BR>> <BR>> Code Snippet >
DDRA=0xff; //PORTA =
o/p<BR>>
PORTA=0x00; //set PORTA
bits=0<BR>>
DDRC=0x00; //PORTC =
i/p<BR>>
PORTC=0xff; //ena
PU<BR>>
while(1)<BR>>
{
<BR>>
ch=PINC; //read PORTC (should read <BR>> 0xff)
[ch defined as unsigned
char]<BR>>
PORTA=ch; //wr ch to
PORTA<BR>>
}<BR>> <BR>> Executing this > I measure on
PORTC bits 0,1,2,3,5,6,7 = 1
<BR>>
bit
4=hiZ<BR>>
<BR>>
On PORTA I measure bits 0,1,6,7 = 1
<BR>>
bits 2,3,4,5 = 0<BR>>
<BR>>
If I GND PORTC 0,1,6,7 the PORTA bits 0,1,6,7 <BR>> respond
correctly<BR>>
PORTA bits 2,3,4,5 remains=0 gnd or hi<BR>> <BR>> If I run the
same routine substituting PORTC params in code with that <BR>> of PORTD,
doing the same test<BR>> exhibit the correct results, as what I would
expect. ie when PORTD <BR>> 0..7 change, the corresponding<BR>>
bits change on PORTA 0..7<BR>> <BR>> btw - I have NO loads
connected to either port, just the cpu basic <BR>> connections at this
time.....<BR>> However, at the time when I noticed the problem, I had a
std stable <BR>> ttl load on PORTC.<BR>> <BR>> I have used 4
new CPU's both Mega16 and Mega16L , same result?<BR>> <BR>> What
am I doing wrong, or what don't I understand about what I am <BR>>
attempting to do?<BR>> Please, please, I a pulling my hair (and I don't
have a lot!) for the <BR>> last 24hr without<BR>> seeing the elephant
in the room.....<BR>> <BR>> Any help will be
appreciated.<BR>> <BR>> Regards,<BR>> Gerhard
Laubscher<BR>> Electronic Engineer (Comms Officer)<BR>> SANAE 47
OverWinter Team<BR>> SANAE iv Base (71o40' S / 2o51' W)
Check-out SANAE Base on Google <BR>> Earth!!<BR>> Antarctica<BR>>
Tel : +27-21-405 9428/29 Fax : +27-21-405 9432
(std rates)<BR>> SattPhone : 008816 315 467
74 HF : 6.210 Mhz<BR>> Skype :
gerhardjl<BR>> email : <A
href="mailto:gerhard.laubscher@sanae.sanap.ac.za">gerhard.laubscher@sanae.sanap.ac.za</A>
<BR>> <<A
href="mailto:gerhard.laubscher@sanae.sanap.ac.za">mailto:gerhard.laubscher@sanae.sanap.ac.za</A>><BR>>
website : <A
href="http://www.sanap.org.za/sanae_team.html">www.sanap.org.za/sanae_team.html</A>
<BR>> <<A
href="http://www.sanap.org.za/sanae_team.html">http://www.sanap.org.za/sanae_team.html</A>><BR>>
<BR>> <BR>> <BR>> <BR>> <BR>>
<BR>>
<BR>> <BR>>
------------------------------------------------------------------------<BR>><BR>>
_______________________________________________<BR>> Icc-avr mailing
list<BR>> <A
href="mailto:Icc-avr@imagecraft.com">Icc-avr@imagecraft.com</A><BR>> <A
href="http://dragonsgate.net/mailman/listinfo/icc-avr">http://dragonsgate.net/mailman/listinfo/icc-avr</A><BR>>
<BR><BR>_______________________________________________<BR>Icc-avr mailing
list<BR><A
href="mailto:Icc-avr@imagecraft.com">Icc-avr@imagecraft.com</A><BR><A
href="http://dragonsgate.net/mailman/listinfo/icc-avr">http://dragonsgate.net/mailman/listinfo/icc-avr</A><BR><BR></BLOCKQUOTE>
<P>
<HR>
<P></P>_______________________________________________<BR>Icc-avr mailing
list<BR>Icc-avr@imagecraft.com<BR>http://dragonsgate.net/mailman/listinfo/icc-avr<BR></BLOCKQUOTE></BODY></HTML>