CTC Opeartion Issues

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi.

 

OK, I have an ATmega324PA, and when I program this chip with and ICE3 the CTC on Timer1 works, and flashes the LED.  If I power off, and restart the micro, the CTC does not work.  If I blow the code again, and leave the programmer connected the CTC works.

 

What happens after the code is blow, does it clear the interrupts, or is it holding the micro in reset.  I cant understand how the code works after being blow, but not on restart?

 

Look forward to your reply.

 

Thanks,

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Post the smallest amount of source code that demonstrates the problem, and a schematic of your hardware along with your fuses values.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DO you have a pullup resistor on the Reset line?  10k is the normal.  The ICE is probably holding the reset line high for you.

 

Tuurbo46 wrote:
I program this chip with and ICE3

I am guessing you mean jtagice3?

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What else is conected to the uC?

 

What is your power supply?

 

Make sure you have a good ground connection between the power supply and the uC, sometimes when the uC only works with the programmer connected it is because the programmer is supplying the ground connection.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
Make sure you have a good ground connection between the power supply and the uC, sometimes when the uC only works with the programmer connected it is because the programmer is supplying the ground connection.

That would also be my first guess.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

All solved, you were correct it was a GND issue.  It is always nice to have someone else's input.  I was adamant it as a software problem.

 

Anyway, thanks again for all your help.

 

Tuurbo46