Author Topic: Replacing PIC16C505 with PIC16F505  (Read 481 times)

0 Members and 1 Guest are viewing this topic.

Offline perdrix

  • Regular Contributor
  • *
  • Posts: 235
Replacing PIC16C505 with PIC16F505
« on: March 17, 2019, 05:36:49 pm »
If I insert a programmed 16C505 into a programmer and read it, can I then write the image to a PIC16F505 and just plug it into the existing circuit?

Would I be correct in thinking that if I try to read a protected 16C505 I will get a nastygram from my programmer?

Thanks
David
 

Offline Niklas

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: se
Re: Replacing PIC16C505 with PIC16F505
« Reply #1 on: March 18, 2019, 08:17:44 am »
Not sure that you will get any warnings if the part is read protected. The easiest way to find out is to check the hex file read from the part and see if the address range 0x0000 to 0x00FF contains anything else than 00 or FF.
 

Offline perdrix

  • Regular Contributor
  • *
  • Posts: 235
Re: Replacing PIC16C505 with PIC16F505
« Reply #2 on: March 18, 2019, 10:08:09 am »
No its not zero or FF.   So I *think* it read OK.  However still want to know if I can replace with PIC16F505.

Thanks
 

Offline up8051

  • Regular Contributor
  • *
  • Posts: 93
  • Country: pl
Re: Replacing PIC16C505 with PIC16F505
« Reply #3 on: March 18, 2019, 11:53:16 am »
Show the sample of readed data.
Did you copy configuration bits?
 

Offline perdrix

  • Regular Contributor
  • *
  • Posts: 235
Re: Replacing PIC16C505 with PIC16F505
« Reply #4 on: March 18, 2019, 12:10:45 pm »
Show the sample of readed data.
Did you copy configuration bits?

Data: Intel hex format
Code: [Select]
:100000002500090C24000A0C0A09A304A50B84018D
:100010006000A40284011F0E4307070A0008FF0FB7
:10002000FF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0F60
:10003000FF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0F50
:10004000FF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0F40
:10005000FF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0F30
:10006000FF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0F20
:10007000FF0FFF0FFF0FFF0FFF0FFF0FFF0FFF0F10
:100080000000000000000000000000000000000070
:100090000000000000000000000000000000000060

Config bits - Dunno - just told the rommer to read the IC
 

Offline perdrix

  • Regular Contributor
  • *
  • Posts: 235
Re: Replacing PIC16C505 with PIC16F505
« Reply #5 on: March 18, 2019, 02:16:26 pm »
I think that this may be a non starter as the config word is 0400 AFAICT which I think says "Write Protected" and "INTRC Osc/GP4"

All memory from x'80' to x'7ff' is read as zeros :(

Dave
 

Offline up8051

  • Regular Contributor
  • *
  • Posts: 93
  • Country: pl
Re: Replacing PIC16C505 with PIC16F505
« Reply #6 on: March 18, 2019, 07:22:08 pm »
It is protected.

From datasheet:
7.10 Program Verification/Code Protection
If  the  code  protection  bit  has  not  been  programmed,the  on-chip  program  memory  can  be  read  out  forverification purposes.
The first 64 locations and the last location (OSCCAL)can  be  read,  regardless  of  the  code  protection  bit setting.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf