Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support For PIC 16F877 #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alchemycs
Copy link

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 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!

@rweather
Copy link
Owner

rweather commented Jul 7, 2013

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 [email protected] 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:

#2
Commit Summary

  • Add support for the PIC16F877

File Changes

Patch Links:

@alchemycs
Copy link
Author

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.

@sh123
Copy link

sh123 commented Mar 21, 2015

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.

@alchemycs
Copy link
Author

Great stuff! Glad to know my little note helped someone :)

@eslammohamedahmed
Copy link

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

@skcks
Copy link

skcks commented Sep 30, 2019

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

@sh123
Copy link

sh123 commented Sep 30, 2019

@skcks, I guess this document explains bits meaning.

@skcks
Copy link

skcks commented Sep 30, 2019

@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.

@sh123
Copy link

sh123 commented Oct 2, 2019

@skcks , most likely read operation is not successful if you are getting consistent pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants