HV Rescue v 2.1 - Both Leds allways on

Topics related to the HV Rescue Shield:
http://mightyohm.com/hvrescue2
Veonix84
Posts: 7
Joined: Tue Mar 08, 2011 2:18 pm

Re: HV Rescue v 2.1 - Both Leds allways on

Post 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.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: HV Rescue v 2.1 - Both Leds allways on

Post 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
Veonix84
Posts: 7
Joined: Tue Mar 08, 2011 2:18 pm

Re: HV Rescue v 2.1 - Both Leds allways on

Post 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.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: HV Rescue v 2.1 - Both Leds allways on

Post 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.
Attachments
HVRescue_Shield.zip
(20.54 KiB) Downloaded 916 times
Veonix84
Posts: 7
Joined: Tue Mar 08, 2011 2:18 pm

Re: HV Rescue v 2.1 - Both Leds allways on

Post 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
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: HV Rescue v 2.1 - Both Leds allways on

Post 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).
Post Reply