Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: cool on March 10, 2012, 12:05:20 PM

Title: problem regarding disabling of JTAG in ATMEGA16
Post by: cool on March 10, 2012, 12:05:20 PM
HI,
   PLS someone help me to disable JTAG in atmega16....i m doing project of pid line follower robot by pratheek...in the main  code(lotl.c provided by author) i  wrote this code   "MCUCSR=(1<<JTD);
  MCUCSR=(1<<JTD);" right after start of main to disable JTAG n created the hex file to load to the mc..but on reset only the backlight of lcd is turning on but i m not able to see any display of menus in it....

I m not getting whether its right to include the code for disabling jtag in the main program or is there any problem wit the code...pls  someone help me save the situation :) :)
Title: Re: problem regarding disabling of JTAG in ATMEGA16
Post by: joe61 on March 10, 2012, 02:20:40 PM
I don't do JTAG so I may be speaking complete nonsense. However, a couple questions do come up.

Does it matter to you that you're clearing all the bits in MCUCSR except bit 7? That will change the edge on which interrupt 2 occurs, which I believe you're using.

Speaking of interrupts, the code uses deprecated syntax to declare the interrupt routines. new code should use the ISR (...) macro. The interrupt names being used are also deprecated. Take a look at http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html (http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html) for current names.

If none of that helps, and you don't get an answer here, try asking on http://www.avrfreaks.net/ (http://www.avrfreaks.net/) in the AVR forum. Someone there will be able to help you out.

Joe