Some time ago I purchased an electronic bike horn (Piezo output) from Ebay. I never did like the selection of audible alerts especially the short tune they loaded. This was back when I was working with Picaxe only. Since I was unable to reprogram a PIC my plan was to program a SM08M2 to replace the existing chip in this horn.
Fast forward to the fortunate day that I discovered that GCB had progressed from flowchart programming only to a complete textual syntax and nifty code editor.
As you can see in the photo the 8 pin SMD is unmarked so I'm clueless as to what PIC it is. I would really like to reprogram it. So I guess my question is did manufacturers produce any 8 pin PICs that were write once? Or can I assume it's capable of being reprogrammed?
Well that's a bummer. I tried to upload the image of the board from my PC but I haven't figured out how to do it. When I click "Insert Image" it only provides placing an internet link to an image.
Hook at PK3. IF you have vcc and vdd on pins 1 & 8 respectively then you could treat as a standard pic and you may get the chip type returned in the PK3.
Just be careful. 😀
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's funny Evan because when I didn't know any better (one gets smarter reading GCB topics) I purchased a K150. I haven't used it yet so I don't know if it will read the chip like a PK3. Not a big deal though because I've been thinking of springing for a PK3 anyway.
Cheers,
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If it were me, I would remove the exsisting chip, program a known 8 pin dip, then mount it dead bug style. Looks like there is plenty of room based on that large device to the right in the picture. You might have to solder the wires very close to chip body and cut the legs back.
Now that may not be the best way, but for me it would be the simple way since I could test it in my vector bread b.
Last edit: Paul Haug 2017-04-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Paul, that makes little sense to me because I have nothing to loose with attempting to reprogram it. Why go through that work unless I have to? As far as lots of room to play with... Not quite so when that board is mounted in its close fitting enclosure.
On another note that large black component you addressed is a miniature auto-transformer used to boost the audio signal to the Piezo. This is a simple circuit to reverse engineer so I did so. Take a look
The chip on the board cannot be programmed in-circuit because the VPP/MCLR is tied directly to ground. So the first thing that would need to be done is to hack the board so that Pin 4 (VPP) is tied to Vcc via a 10K resistor. This would allow attaching a Pickit2 or Pickit3 to attempt to read the chip.
The chip could be read either using PK2/3 GUI or IPE. Not sure how a K150 would do, but I would only use it as a last resort as it could erase the calibration data if the chip is a low level type ( ei. 12F510)
Good Luck
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried erasing picaxe chips with pickit2. It didn't recognise the chip so couldn't erase it.
I bought a pickit3 but it's not as easy to use with GCB as pickit2. Use in-circuit programming,not a zif socket. PK2 is £5 and PK3 £10. I got clones and they're fine so far. Easy as picaxe but using the terminal needs a usb serial converter and loads of messing around it seems. So I bought an adaptor for £3.
Last edit: stan cartwright 2017-04-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried erasing picaxe chips with pickit2. It didn't recognise the chip so couldn't erase it.
Need to be specific when making these kind of comments.
What chips? What PK2Device file? Did you try "Manual Device Select"? .
Baseline chips cannot be autodetected by PK2/PK3 GUI and reqiuire that the user manually set the familly and the specific chip. . Some chips are not supported by PK2/3 device file.
I have never had any trouble erasing a supported PIC with PK2/PK3, so perhaps you could provide the steps you took to attempt to erase the chips so that we can see if there is a problem, or if you simply did not do it correctly.
William
Last edit: William Roth 2017-04-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Some Chips have the Read Protect Flags set, the PICAxe famaly amongst them, specificaly to prevent people reading a Device and then programing several blank PIC's at a fraction of the cost of the propriatory version.
That is probably why the Chip wasn't recognised in this instance.
But as Bill says, there are many other variables and making assumptions you are more likely to Brick the Device than reprogram it if you have the facts wrong.
Cheers
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, these replies have been very helpful. More so, they've been informative. One of the things I've been unsure of is the pinout of this unmarked chip. Judging by William's reply regarding the MCLR/VPP pin I take that as meaning all 8 pin PICs will have MCLR/VPP asigned to pin 4. Lifting that leg and cutting the pad with an exacto-knife should be easy. Dental pics are handy for this kind of work.
As far as not being able to read a protected chip or possibly bricking it.... No big deal. If this fails I'll pull the chip and replace it with something like the SMD version of a 12F629 or a 12F1840 or any SMD 8 pin PIC you guys think is a good choice.
Thanks!
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
PIC's have a very uniform Pinout, especialy in the 8/14/20 Pin Families.
They all have Power (Vdd) on Pin 1 and Ground (Vss) on the opposite Pin (8/14/20 - Depending on the Package). RA3 (Mclr) is always on Pin 4 and PGD/PGC are always the two pins derectly bellow Vss.
If you set up a board with a 20 pin socket and those 5 pins connected to an ICSP header you can interchange and program over 100 different pics.
Some Chips have the Read Protect Flags set, the PICAxe famaly amongst them, specificaly to prevent people reading a Device and then programing several blank PIC's at a fraction of the cost of the propriatory version.
That is probably why the Chip wasn't recognised in this instance.
The read protect bit(s) do not prevent device detection nor will they prevent a device from being erased.
For example, a Picaxe 08M2 will still be autodetected as PIC12F1840, However a read will return all "0's",
An erase will erase the entire chip, including the Picaxe Bootloder/Firmware. Configs will be reset to thier default POR values.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi William Roth,I plugged a picaxe 28x2 ie 18f25k22 into a zif socket adaptor connected to pickit2. It didn't recognise the device.Manual select doesn't list 18f25k22 and 18fxxkxx family select -nothing.
So I tried pickit3 and it recognised the device and erased it.I'll use it as a pic now for some reason :) no option really. It's a nice chip,enough ram for glcd.Why do the pics with >=1K ram have 28 or more pins?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If it wasn't for revolution education's £3.50 p&p then vat on top,the preprogrammed x2 is the same price,for most of us,as buying the pic..but that's irrelevant.And what would be the point of reverse engineering a picaxe chip? :)
Funny,connected to a glcd,a #chip pic,64 seems the same as a #chip mega 328p,16 as for real time visual perception.But hay,it's fun. You can write inefficient code and it does the job :)
not
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi William Roth,I plugged a picaxe 28x2 ie 18f25k22 into a zif socket adaptor connected to pickit2. It didn't recognise the device.Manual select doesn't list 18f25k22 and 18fxxkxx family select -nothing.
As Evan suggested. You are prtobably using an old PK2Devicefile.dat. The one that comes with thelatest GCB install should detect the 18F25K22 ok Probebly the best device file is the GCB only file that is 150K kb and is dated 6/16/2016. If the device file is 153KB and is dated 1/9/2009 it will likely have probabems. If it is 189Kb abd dated 12/18/2015 is may also have problems.
Suggest you copy the Pk2DEvicefile,dat from Folder " C:\GCB@Syn\PicKit2\Updated DAT file" to Folder "C:\GCB@Syn\PicKit2' and to Folder "C:\GCB@Syn\PICkit2GUI" and to the Folder where the PK3 GUI app is installed. And Yes the PK3 GUI app uses the PK2 device file.
As far s the ZIF Adapter goes, If it it one of those made in china universal adapters with lots of jumpers and no diagram/manual, it is quite possible if not likely that the jumpers are wrong.
William
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Some time ago I purchased an electronic bike horn (Piezo output) from Ebay. I never did like the selection of audible alerts especially the short tune they loaded. This was back when I was working with Picaxe only. Since I was unable to reprogram a PIC my plan was to program a SM08M2 to replace the existing chip in this horn.
Fast forward to the fortunate day that I discovered that GCB had progressed from flowchart programming only to a complete textual syntax and nifty code editor.
As you can see in the photo the 8 pin SMD is unmarked so I'm clueless as to what PIC it is. I would really like to reprogram it. So I guess my question is did manufacturers produce any 8 pin PICs that were write once? Or can I assume it's capable of being reprogrammed?
Well that's a bummer. I tried to upload the image of the board from my PC but I haven't figured out how to do it. When I click "Insert Image" it only provides placing an internet link to an image.
Thanks,
Chris
Edit: Ah, I figured it out. Here it is.
Last edit: CDRIVE 2017-04-09
Interesting....
Hook at PK3. IF you have vcc and vdd on pins 1 & 8 respectively then you could treat as a standard pic and you may get the chip type returned in the PK3.
Just be careful. 😀
That's funny Evan because when I didn't know any better (one gets smarter reading GCB topics) I purchased a K150. I haven't used it yet so I don't know if it will read the chip like a PK3. Not a big deal though because I've been thinking of springing for a PK3 anyway.
Cheers,
Chris
If it were me, I would remove the exsisting chip, program a known 8 pin dip, then mount it dead bug style. Looks like there is plenty of room based on that large device to the right in the picture. You might have to solder the wires very close to chip body and cut the legs back.
Now that may not be the best way, but for me it would be the simple way since I could test it in my vector bread b.
Last edit: Paul Haug 2017-04-10
Paul, that makes little sense to me because I have nothing to loose with attempting to reprogram it. Why go through that work unless I have to? As far as lots of room to play with... Not quite so when that board is mounted in its close fitting enclosure.
On another note that large black component you addressed is a miniature auto-transformer used to boost the audio signal to the Piezo. This is a simple circuit to reverse engineer so I did so. Take a look
Thanks for the input.
Chris
CDRIVE,
The chip on the board cannot be programmed in-circuit because the VPP/MCLR is tied directly to ground. So the first thing that would need to be done is to hack the board so that Pin 4 (VPP) is tied to Vcc via a 10K resistor. This would allow attaching a Pickit2 or Pickit3 to attempt to read the chip.
The chip could be read either using PK2/3 GUI or IPE. Not sure how a K150 would do, but I would only use it as a last resort as it could erase the calibration data if the chip is a low level type ( ei. 12F510)
Good Luck
I tried erasing picaxe chips with pickit2. It didn't recognise the chip so couldn't erase it.
I bought a pickit3 but it's not as easy to use with GCB as pickit2. Use in-circuit programming,not a zif socket. PK2 is £5 and PK3 £10. I got clones and they're fine so far. Easy as picaxe but using the terminal needs a usb serial converter and loads of messing around it seems. So I bought an adaptor for £3.
Last edit: stan cartwright 2017-04-11
Need to be specific when making these kind of comments.
What chips? What PK2Device file? Did you try "Manual Device Select"? .
Baseline chips cannot be autodetected by PK2/PK3 GUI and reqiuire that the user manually set the familly and the specific chip. . Some chips are not supported by PK2/3 device file.
I have never had any trouble erasing a supported PIC with PK2/PK3, so perhaps you could provide the steps you took to attempt to erase the chips so that we can see if there is a problem, or if you simply did not do it correctly.
William
Last edit: William Roth 2017-04-11
Some Chips have the Read Protect Flags set, the PICAxe famaly amongst them, specificaly to prevent people reading a Device and then programing several blank PIC's at a fraction of the cost of the propriatory version.
That is probably why the Chip wasn't recognised in this instance.
But as Bill says, there are many other variables and making assumptions you are more likely to Brick the Device than reprogram it if you have the facts wrong.
Cheers
Chris
OK, these replies have been very helpful. More so, they've been informative. One of the things I've been unsure of is the pinout of this unmarked chip. Judging by William's reply regarding the MCLR/VPP pin I take that as meaning all 8 pin PICs will have MCLR/VPP asigned to pin 4. Lifting that leg and cutting the pad with an exacto-knife should be easy. Dental pics are handy for this kind of work.
As far as not being able to read a protected chip or possibly bricking it.... No big deal. If this fails I'll pull the chip and replace it with something like the SMD version of a 12F629 or a 12F1840 or any SMD 8 pin PIC you guys think is a good choice.
Thanks!
Chris
PIC's have a very uniform Pinout, especialy in the 8/14/20 Pin Families.
They all have Power (Vdd) on Pin 1 and Ground (Vss) on the opposite Pin (8/14/20 - Depending on the Package). RA3 (Mclr) is always on Pin 4 and PGD/PGC are always the two pins derectly bellow Vss.
If you set up a board with a 20 pin socket and those 5 pins connected to an ICSP header you can interchange and program over 100 different pics.
You may find my blog posts here to be interesting:- http://caroper.blogspot.com/2015/08/lord-of-boards-microchip-make-vast.html
Cheers
Chris
Chris, thanks for the link to your blog. I read most of it. That said the pinout information you posted here is most valuable to me.
Thanks,
Chris
The read protect bit(s) do not prevent device detection nor will they prevent a device from being erased.
For example, a Picaxe 08M2 will still be autodetected as PIC12F1840, However a read will return all "0's",
An erase will erase the entire chip, including the Picaxe Bootloder/Firmware. Configs will be reset to thier default POR values.
Hi William Roth,I plugged a picaxe 28x2 ie 18f25k22 into a zif socket adaptor connected to pickit2. It didn't recognise the device.Manual select doesn't list 18f25k22 and 18fxxkxx family select -nothing.
So I tried pickit3 and it recognised the device and erased it.I'll use it as a pic now for some reason :) no option really. It's a nice chip,enough ram for glcd.Why do the pics with >=1K ram have 28 or more pins?
I know the answer...... the Pk2 dat file is not the same as the Pk3 dat file.
Did you install the pk2 from the web? or, are you running from GCB install?
Anyway... you have it working.
If it wasn't for revolution education's £3.50 p&p then vat on top,the preprogrammed x2 is the same price,for most of us,as buying the pic..but that's irrelevant.And what would be the point of reverse engineering a picaxe chip? :)
Funny,connected to a glcd,a #chip pic,64 seems the same as a #chip mega 328p,16 as for real time visual perception.But hay,it's fun. You can write inefficient code and it does the job :)
not
As Evan suggested. You are prtobably using an old PK2Devicefile.dat. The one that comes with thelatest GCB install should detect the 18F25K22 ok Probebly the best device file is the GCB only file that is 150K kb and is dated 6/16/2016. If the device file is 153KB and is dated 1/9/2009 it will likely have probabems. If it is 189Kb abd dated 12/18/2015 is may also have problems.
Suggest you copy the Pk2DEvicefile,dat from Folder " C:\GCB@Syn\PicKit2\Updated DAT file" to Folder "C:\GCB@Syn\PicKit2' and to Folder "C:\GCB@Syn\PICkit2GUI" and to the Folder where the PK3 GUI app is installed. And Yes the PK3 GUI app uses the PK2 device file.
As far s the ZIF Adapter goes, If it it one of those made in china universal adapters with lots of jumpers and no diagram/manual, it is quite possible if not likely that the jumpers are wrong.
William