Open alchemycs opened 11 years ago
That's awesome!
I have a PIC16F877 myself, but could never get it to flash - I assumed it was something wrong with my breadboard or chip rather than a problem with the amount of power that can be delivered via D2. Thanks for discovering that!
I wonder if it may be possible to connect D2 to the base of a switching transistor or FET instead to connect the Arduino's 5V supply rail to VDD on the PIC16F877 under program control? Then the PIC can draw as much current from the 5V rail as it wants via the transistor/FET without going through the ATmega first. That would alleviate the need for the connect/disconnect/reconnect dance.
Cheers,
Rhys.
On Sun, Jul 7, 2013 at 1:48 PM, alchemycs notifications@github.com wrote:
I've added chipset data for the 16F877 that someone else may find useful.
I've had one of these lying around for years not doing anything, but now I can actually make use of it!
As a side note I have a develop branchhttps://github.com/alchemycs/ardpicprog/tree/developin my fork that fixes up your reference to Plang to ardpicprog as well as some notes on the 16f877 and the current draw. I left them out of this pull request in case you wanted to deal with it some other way.
Also I wanted to say thanks for the work you have done on this project!
You can merge this Pull Request by running
git pull https://github.com/alchemycs/ardpicprog master
Or view, comment on, or merge it at:
https://github.com/rweather/ardpicprog/pull/2 Commit Summary
- Add support for the PIC16F877
File Changes
- M ProgramPIC/ProgramPIC.pdehttps://github.com/rweather/ardpicprog/pull/2/files#diff-0(6)
Patch Links:
I wasn't using the 5V from the Arduino, I was using a bench supply (just to be safe).
I think using a transistor is a good idea, but someone (like me) might just be using the USB power to run the Arduino itself, so maybe using a voltage divider from the 13V supply would be safer than pulling it from the Arduino. I'll see if I can measure the current draw from the PIC sometime this week.
alchemycs, thank you for this useful information regarding pic16f877.
I have similar story. Have couple of old unused pic16f877 in the box. Decided to build something useful out of it and flash it using ardpicprog. Spent couple of hours troubleshooting with oscilloscope, all seems to be fine, but could not flash. Now I know the reason and will try your solution.
Update: just took 5V power from Arduino board itself and device command proceeded successfully:
OK DeviceID: 09A6 DeviceName: pic16f877 ProgramRange: 0000-1FFF ConfigRange: 2000-2007 DataRange: 2100-21FF ConfigWord: 3FFF
Before it did not work, returned all zeros.
Great stuff! Glad to know my little note helped someone :)
hello i'm very pleasure with this project i made this shield it works good but i want add support to pic16f877a and can please explain this (({s_pic16f628a, 0x1060, 2048, 0x2000, 0x2100, 8, 128, 0, 0, FLASH4, EEPROM},)) to me , thanks at all
ConfigWord: 3FFF
what is meaning when config word is 3FFF。 I have a liitte confusing when trying to read out hex from my pic chip. could you explain that for me?thanks. @sh123
@skcks, I guess this document explains bits meaning.
i am trying to read out hex from pic16f887, the hex file always fill full with 0xFF3FFF ......, this is some bug case that or code protected? @sh123 thanks your answer.
@skcks , most likely read operation is not successful if you are getting consistent pattern.
I've added chipset data for the 16F877 that someone else may find useful.
I've had one of these lying around for years not doing anything, but now I can actually make use of it!
As a side note I have a develop branch in my fork that fixes up your reference to
Plang
toardpicprog
as well as some notes on the 16f877 and the current draw. I left them out of this pull request in case you wanted to deal with it some other way.Also I wanted to say thanks for the work you have done on this project!