Page 2 of 2

Re: HV Rescue v 2.1 - Both Leds allways on

Posted: Fri Mar 11, 2011 2:05 pm
by Veonix84
That is great, you were able to reproduce what I was seeing.

I don't know why I don't have an UNO.
This is the only use i'll be getting out of my Arduino Mega 1280.


Thanks for the update.

Re: HV Rescue v 2.1 - Both Leds allways on

Posted: Sat Mar 12, 2011 3:33 pm
by mightyohm
I guess it should have been obvious from the start, but the Rescue Shield sketch will not work on the Mega without significant changes.

The Mega hardware differs significantly from the original Arduino in the way digital lines 0-13 are handled in the hardware. I'm going to have to rewrite portions of the code to handle this difference.

It looks doable but I need to figure out the most graceful way to handle this while maintaining compatibility with the original Arduino. I don't want to have separate branches of the source for each board.

Still working on it, but this will take a little while for me to fix... Bear with me.

When I originally wrote this sketch, the Mega didn't exist yet. :D

Re: HV Rescue v 2.1 - Both Leds allways on

Posted: Mon Mar 14, 2011 4:52 am
by Veonix84
I'm in no hurry.

Turns out I only have a single ATmega48 with bad bits.
Well actually three, but two others are simply configured for 16 Mhz but only rated for 10.
I just have to set them back to default.

It's funny that the Arduino boards differ so much.
They #IF DEF the heck out of the Arduino base libraries for compatibility.
I hope you won't have to as well.

I actually compared pinouts from pictures of the Arduino boards because I found little to nothing about shield compatibility.

Re: HV Rescue v 2.1 - Both Leds allways on

Posted: Tue Mar 15, 2011 2:35 pm
by mightyohm
Ok, I added some new functions for the Arduino Mega, and based on my testing this should work for the ATmega48P as well as all the other parts that the Shield supports.

Try this sketch and let me know if it works for you.

Be sure to set the MEGA define to 1, this is just below the comments at the start of the Sketch. And make sure your Board is set properly in the Arduino menu before you compile/upload the sketch.

Re: HV Rescue v 2.1 - Both Leds allways on

Posted: Wed Mar 16, 2011 6:11 am
by Veonix84
It worked!
Thank you very much MightyOhm.

I can read and write the bits successfully.
It actually showed me the bits I had wrongfully set the ATmega to.

Cheers,
Nicholas

Re: HV Rescue v 2.1 - Both Leds allways on

Posted: Wed Mar 16, 2011 11:16 am
by mightyohm
Cool! I'll post the new code on the blog shortly, along with a picture of how to correctly install the shield on the Mega (which you already figured out).