Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 08-19-2013, 04:44 PM   #11 (permalink)
EcoModding Apprentice
 
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
Quote:
Originally Posted by t vago View Post
Can you give us a list of the interrupt vectors you're using?
The vectors I'm using are the original version 0.86, has no change, what are these.
Code:
ISR(TIMER2_OVF_vect)
ISR(INT0_vect)
ISR(INT1_vect)
ISR( PCINT1_vect )
Thank you
José Rodrigues

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 08-20-2013, 06:49 AM   #12 (permalink)
EcoModding Apprentice
 
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
I think the problem is the injector pins, together with the interruptions. I've been doing some more experiments in the code of the injectors, and did not do a reset, but the image did not change the lcd, even By pressing the buttons.

Thank you
José Rodrigues
  Reply With Quote
Old 08-27-2013, 06:58 AM   #13 (permalink)
EcoModding Apprentice
 
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
I've been looking on the internet and found that the Timer2 in atmega 328 controls with pins 3 and 11, and with the mega, pins 9 and 10.
Is that the problem I have?
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.
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.

Thank you
José Rodrigues

Last edited by josemapiro; 08-30-2013 at 01:31 PM..
  Reply With Quote
Old 08-27-2013, 09:21 AM   #14 (permalink)
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
Old 08-28-2013, 03:18 PM   #15 (permalink)
EcoModding Apprentice
 
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
I've been checking the Timer2 perishes not be related to the INT0 and INT1, but with the PWM pins OC1A and OC2B.
If I understand correctly, the Timer2, control the Pins 3 and 11, but as PWM output.
Please correct me if I'm wrong.

Quote:
Originally Posted by t vago View Post
Sounds like you have set yourself up to be able to simplify your LCD output routines.
Apparently this was the easiest part, the idea was to release the PWM pins for possible upgrades, while staying with the PWM pins free, for play with one or the other to make the injectors work.

Thank you
José Rodrigues

Last edited by josemapiro; 08-30-2013 at 01:31 PM..
  Reply With Quote
Old 08-30-2013, 12:09 PM   #16 (permalink)
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 checking the Timer2 perishes not be related to the INT0 and INT1, but with the PWM pins OC1A and OC2B.
If I understand correctly, the Timer2, control the Pins 3 and 9, but as PWM output.
Not sure if you mean "pins 3 and 9" on your AtMega2560. On the AtMega328 (and presumably earlier chips), brightness is mapped to Port B bit 1, which is pin 15; and contrast is mapped to Port D bit 6, which is pin 12.
  Reply With Quote
Old 08-30-2013, 02:02 PM   #17 (permalink)
EcoModding Apprentice
 
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
I apologize for the mistake, not the pin 3 and 9 but 3 and 11.

Quote:
Originally Posted by t vago View Post
Not sure if you mean "pins 3 and 9" on your AtMega2560. On the AtMega328 (and presumably earlier chips), brightness is mapped to Port B bit 1, which is pin 15; and contrast is mapped to Port D bit 6, which is pin 12.
I meant the atmega 328, Port D bit 3, pin 5, and Port B bit 3, pin 17.
The statement 3 and 11, is that recorded on board the arduino uno, so does the pins 9 and 10 of the Arduino Mega, once again I apologize for the confusion, I usually use the sheets with pinout of pighixxx.com , and this is reason to use that number and not the actual number of pins of the atmega chip.

This information was gathered from this site: Arduino 101: Timers and Interrupts | Let's Make Robots!
I leave here also the image of the pinout atmega 328 I use

Might be useful to someone

Thank you
José Rodrigues
  Reply With Quote
Old 10-15-2013, 08:01 PM   #18 (permalink)
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
How do you have your LCD hooked up to your Mega?
  Reply With Quote
Old 10-23-2013, 02:10 PM   #19 (permalink)
EcoModding Apprentice
 
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
Quote:
Originally Posted by t vago View Post
How do you have your LCD hooked up to your Mega?
I apologize for my lack of attention, I just concentrated on another post, I did not see your question. I will not answer now because I have done in another post, but if you have any questions feel free to ask.

Thank you
José Rodrigues

  Reply With Quote
Reply  Post New Thread


Thread Tools




Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com