View Single Post
Old 08-27-2013, 09:21 AM   #14 (permalink)
t vago
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 828
Thanked 708 Times in 456 Posts
Quote:
Originally Posted by josemapiro View Post
I've been looking on the internet and found that the Timer2 in atmega 328 controls with pins 3 and 9, and with the mega, pins 9 and 10.
You should change the pins, then. The AtMega2560 has a hardware configuration that is different from the AtMega168/328, as you have seen, so anything you can do to modify the MPGuino code to fit the AtMega2560 will help you.

As to whether it's causing your continual resets... That's a good question. Only thing I can suggest is to keep on finding the spots in the MPGuino code that are hardware dependent, and change them. That, and keep good notes.

Quote:
Originally Posted by josemapiro View Post
What is the advice you give, change the Timer2 or change the pins and keep the Timer2.
In the mega, the Timer0 and Timer2 are 8bits as the atmega 328, and the rest are 16bit.
To change the timer and keep 8bits, could only be with Timer0, which somewhat limits the options, I think the best is to change the pins and keep the Timer2.
What is your opinion regarding this issue.
Keep Timer2, if at all possible. The MPGuino code is written to use Timer2, so changing the timer will cause you to have to extensively re-write the code. Concentrate on getting the code to work with the AtMega2560 hardware, first.

Quote:
Originally Posted by josemapiro View Post
Note: Pins that are occupied on my arduino mega are 13 and 11, the remaining PWM are free, I changed the lcd for Pins PA0, PA1, PA2, PA3, PA4 and PA5 Pins that are 22, 23, 24 , 25, 26 and 27.
Sounds like you have set yourself up to be able to simplify your LCD output routines.
  Reply With Quote