PIC Help

W

What The

Guest
Hi guys and gals...


I have a PIC 16F84A-04P that was part of a Silicon Chip Digital Tachometer
kit (Apr2000). I built this for a guy, and he blew it up (connected the
wrong output from the car to the wrong input on the board... lol). I built
him another one and its all OK (showed it working before he took it this
time!)

Seems as though the PIC has been wiped/damaged. I have a universal USB Chip
programmer that i use for EEPROMs and using the software have set it up to
read/write to the PIC and its no go, it goes through the motions, but
nothing is ever written to the chip.

My question is, how sensitive are these things, i.e if its damaged would i
get some kind of corrupted write? or none at all?

Also could i replace it with a 16F84A-20P from jaycar (probably expensive i
know, but its convienent)?

I have downloaded the HEX file from the Silicon Chip website, but i'm just
not sure if the different chip will work or if they're basically the same
deal and should be ok?


Thanks.
 
"What The" <none@none.com> wrote in message
news:7CT9l.9633$cu.697@news-server.bigpond.net.au...
Hi guys and gals...


I have a PIC 16F84A-04P that was part of a Silicon Chip Digital Tachometer
kit (Apr2000). I built this for a guy, and he blew it up (connected the
wrong output from the car to the wrong input on the board... lol). I built
him another one and its all OK (showed it working before he took it this
time!)

Seems as though the PIC has been wiped/damaged. I have a universal USB
Chip programmer that i use for EEPROMs and using the software have set it
up to read/write to the PIC and its no go, it goes through the motions,
but nothing is ever written to the chip.

My question is, how sensitive are these things, i.e if its damaged would i
get some kind of corrupted write? or none at all?

Also could i replace it with a 16F84A-20P from jaycar (probably expensive
i know, but its convienent)?

I have downloaded the HEX file from the Silicon Chip website, but i'm just
not sure if the different chip will work or if they're basically the same
deal and should be ok?


Thanks.
All bets are off if the chip's damaged. Generally I find that they just
won't read or program, the programmer gives an error.

The 20P should work fine in place of the 04P, the number refers to the max
clock speed (MHz).
 
"Bruce Varley" <bxvarley@weastnet.com.au> wrote in message
news:GemdncOLE-G-tfXUnZ2dnUVZ8uudnZ2d@westnet.com.au...
All bets are off if the chip's damaged. Generally I find that they just
won't read or program, the programmer gives an error.

The 20P should work fine in place of the 04P, the number refers to the max
clock speed (MHz).
Great i'll grab one tomorrow. Thanks for the quick reply, and fingers
crossed that's all there is wrong.
 
On Jan 10, 12:20 pm, "What The" <n...@none.com> wrote:
Hi guys and gals...

I have a PIC 16F84A-04P that was part of a Silicon Chip Digital Tachometer
kit (Apr2000). I built this for a guy, and he blew it up (connected the
wrong output from the car to the wrong input on the board... lol). I built
him another one and its all OK (showed it working before he took it this
time!)

Seems as though the PIC has been wiped/damaged. I have a universal USB Chip
programmer that i use for EEPROMs and using the software have set it up to
read/write to the PIC and its no go, it goes through the motions, but
nothing is ever written to the chip.

My question is, how sensitive are these things, i.e if its damaged would i
get some kind of corrupted write? or none at all?
Usually nothing at all.
Most good programmers will give you an error as they attempt to verify
the data written.

Also could i replace it with a 16F84A-20P from jaycar (probably expensive i
know, but its convienent)?

I have downloaded the HEX file from the Silicon Chip website, but i'm just
not sure if the different chip will work or if they're basically the same
deal and should be ok?
The -20P is identical, just a higher rated clock speed.
But you can't substitute say a 16F628A chip which is the same pinout
as the 16F84A.
16F84 is also slightly different from 16F84A

Dave.
 
"David L. Jones" <altzone@gmail.com> wrote in message
news:87efe84d-bb16-4740-b26e-e6074deeb39e@g3g2000pre.googlegroups.com...
On Jan 10, 12:20 pm, "What The" <n...@none.com> wrote:

Usually nothing at all.
Most good programmers will give you an error as they attempt to verify
the data written.

The -20P is identical, just a higher rated clock speed.
But you can't substitute say a 16F628A chip which is the same pinout
as the 16F84A.
16F84 is also slightly different from 16F84A

Dave.

OK i manged to make it to jaycar before they closed. I got a 16F84A-20/P to
replace the 16F84A-04/P.

Programmed it up, but in the project, it doesn't work at all.

With the original PIC, all the lights come on, but nothing works. With the
new one, none of the lights come on at all.

The programmer i have does verify the program after it has written to the
chip. Now, the weird thing is that sometimes the programmer doesn't read the
data off the chip properly. I'm not sure if this is a software glitch, or a
hardware glitch or that the "new" PIC i got is faulty. I am also assuming
that the code i downloaded from the silicon chip website in the HEX file is
correct...

I got it to program, verify more than once, but sometimes it brings up the
wrong data like there's a bad connection or something, but it does program
and verify, i just have to remove/reinsert it a few times into the ZIF.

Tried multiple times inserting into the socket in the project and it doesn't
seem to want to work. Bah so frustrating. Not worth another $10 i don't
think.

Thanks for the help.
 
"What The" <none@none.com> wrote in message
news:eek:g_9l.9752$cu.5793@news-server.bigpond.net.au...
"David L. Jones" <altzone@gmail.com> wrote in message
news:87efe84d-bb16-4740-b26e-e6074deeb39e@g3g2000pre.googlegroups.com...
On Jan 10, 12:20 pm, "What The" <n...@none.com> wrote:

Usually nothing at all.
Most good programmers will give you an error as they attempt to verify
the data written.

The -20P is identical, just a higher rated clock speed.
But you can't substitute say a 16F628A chip which is the same pinout
as the 16F84A.
16F84 is also slightly different from 16F84A

Dave.


OK i manged to make it to jaycar before they closed. I got a 16F84A-20/P
to replace the 16F84A-04/P.

Programmed it up, but in the project, it doesn't work at all.

With the original PIC, all the lights come on, but nothing works. With the
new one, none of the lights come on at all.

The programmer i have does verify the program after it has written to the
chip. Now, the weird thing is that sometimes the programmer doesn't read
the data off the chip properly. I'm not sure if this is a software glitch,
or a hardware glitch or that the "new" PIC i got is faulty. I am also
assuming that the code i downloaded from the silicon chip website in the
HEX file is correct...

I got it to program, verify more than once, but sometimes it brings up the
wrong data like there's a bad connection or something, but it does program
and verify, i just have to remove/reinsert it a few times into the ZIF.

Tried multiple times inserting into the socket in the project and it
doesn't seem to want to work. Bah so frustrating. Not worth another $10 i
don't think.

Thanks for the help.
Unlikely that the chip would have been faulty on receipt. It could have been
damaged by residual faults in the tacho when you inserted it, something like
a regulator fault that's put 12 volts onto it. If you want to proceed, the
first thing to do is to load a simple test program such as an LED flasher
into the PIC, and verify that the processor functions autonomously, ie. with
just a 5V PSU and a 47n cap across the supply. That will also prove your
programming setup.

Besides being very frustrating, inserting PICs into suspect hardware is a
fine way to run down your stock of chips, you really need to first do
everything you can to verify that the rest of the tacho is OK. For starters,
check that all the socket voltages are between 0 and 5V without the chip
inserted. Good luck.
 
"Bruce Varley" <bxvarley@weastnet.com.au> wrote in message
news:AKCdnTidUaFo7vXUnZ2dnUVZ8uidnZ2d@westnet.com.au...
Unlikely that the chip would have been faulty on receipt. It could have
been damaged by residual faults in the tacho when you inserted it,
something like a regulator fault that's put 12 volts onto it. If you want
to proceed, the first thing to do is to load a simple test program such as
an LED flasher into the PIC, and verify that the processor functions
autonomously, ie. with just a 5V PSU and a 47n cap across the supply. That
will also prove your programming setup.

Besides being very frustrating, inserting PICs into suspect hardware is a
fine way to run down your stock of chips, you really need to first do
everything you can to verify that the rest of the tacho is OK. For
starters, check that all the socket voltages are between 0 and 5V without
the chip inserted. Good luck.



Thanks Bruce,

First check i did was make sure regulation at Pin 4 and 14 was at +5V and it
was (5.015). These were listed as the recommended test points in the initial
power up procedure in the manual for the kit to make sure it was OK before
inserting the PIC for the first time. Its possible other areas have been
damaged for sure and i'll look into that closer. There is no specific
physical damage that i can see at this stage, but of course there doesn't
need to be burn marks for a component to have failed.

I'll start to have a look around for a simple program like an LED flasher to
program to it. This is my first time working with a PIC so its all fairly
foreign to me, but research always clears away the fog, and hopefuly learn
something new along the way.

Thanks again.
 
"David L. Jones" <altzone@gmail.com> wrote in message
news:a26c14b9-261e-4248-bdcd-ee57a68640d1@40g2000prx.googlegroups.com...
It should be correct, but not all HEX files contain the appropriate
configuration fuse info required to set the PIC up correctly
(oscillator source, interrupts, watchdog timer etc). It all depends on
if the original programmer included those (a good programmer would
have). You can check and set them manually in the programmer, but you
have to know what they are originally supposed to be.
Thanks Dave,

I also have the ASM source here from the Siliconchip website (But no tools
to re-compile it, nor do i know how at this point).

When programming the chip there are 3 separate tabs in the software that can
be separately modified "code memory" "data memory" and "user ID memory".
When programming i had to program each of the 3 window separately to
completely program the chip as per the whole hex file. Programming juts the
code memory (as i initially did) made not changes to the data memory which i
initially thought was the reason it didn't work.


Unlikely to be the chip at fault, most likely a dodgy universal
programmer. What brand and model is it?

Dave.
The programmer is one of these, it ain't a cheap one (compared to some ebay
$15 jobs) so i hope its not considered 'too' dodgy. Although obviously its
not a $2000 one that RS sells. lol. I've had no issues with it for
programming the AM29F010 chips that i most commonly use, but its barely done
any work really.

http://www.mcumall.com/comersus/store/comersus_viewItem.asp?idProduct=4219


Thanks.
 
On Jan 10, 7:55 pm, "What The" <n...@none.com> wrote:
"David L. Jones" <altz...@gmail.com> wrote in messagenews:87efe84d-bb16-4740-b26e-e6074deeb39e@g3g2000pre.googlegroups.com...

On Jan 10, 12:20 pm, "What The" <n...@none.com> wrote:

Usually nothing at all.
Most good programmers will give you an error as they attempt to verify
the data written.

The -20P is identical, just a higher rated clock speed.
But you can't substitute say a 16F628A chip which is the same pinout
as the 16F84A.
16F84 is also slightly different from 16F84A

Dave.

OK i manged to make it to jaycar before they closed. I got a 16F84A-20/P to
replace the 16F84A-04/P.

Programmed it up, but in the project, it doesn't work at all.

With the original PIC, all the lights come on, but nothing works. With the
new one, none of the lights come on at all.

The programmer i have does verify the program after it has written to the
chip. Now, the weird thing is that sometimes the programmer doesn't read the
data off the chip properly. I'm not sure if this is a software glitch, or a
hardware glitch or that the "new" PIC i got is faulty. I am also assuming
that the code i downloaded from the silicon chip website in the HEX file is
correct...
It should be correct, but not all HEX files contain the appropriate
configuration fuse info required to set the PIC up correctly
(oscillator source, interrupts, watchdog timer etc). It all depends on
if the original programmer included those (a good programmer would
have). You can check and set them manually in the programmer, but you
have to know what they are originally supposed to be.

I got it to program, verify more than once, but sometimes it brings up the
wrong data like there's a bad connection or something, but it does program
and verify, i just have to remove/reinsert it a few times into the ZIF.
Unlikely to be the chip at fault, most likely a dodgy universal
programmer. What brand and model is it?

Dave.
 
What The wrote:
"David L. Jones" <altzone@gmail.com> wrote in message
news:a26c14b9-261e-4248-bdcd-ee57a68640d1@40g2000prx.googlegroups.com...
It should be correct, but not all HEX files contain the appropriate
configuration fuse info required to set the PIC up correctly
(oscillator source, interrupts, watchdog timer etc). It all depends on
if the original programmer included those (a good programmer would
have). You can check and set them manually in the programmer, but you
have to know what they are originally supposed to be.


Thanks Dave,

I also have the ASM source here from the Siliconchip website (But no tools
to re-compile it, nor do i know how at this point).

When programming the chip there are 3 separate tabs in the software that can
be separately modified "code memory" "data memory" and "user ID memory".
When programming i had to program each of the 3 window separately to
completely program the chip as per the whole hex file. Programming juts the
code memory (as i initially did) made not changes to the data memory which i
initially thought was the reason it didn't work.


Unlikely to be the chip at fault, most likely a dodgy universal
programmer. What brand and model is it?

Dave.

The programmer is one of these, it ain't a cheap one (compared to some ebay
$15 jobs) so i hope its not considered 'too' dodgy. Although obviously its
not a $2000 one that RS sells. lol. I've had no issues with it for
programming the AM29F010 chips that i most commonly use, but its barely done
any work really.

http://www.mcumall.com/comersus/store/comersus_viewItem.asp?idProduct=4219


Thanks.
The MPLAB tools are free from the Microchip website. These will allow you to
write and assemble programs for PIC microcontrollers, as well as debug them in
an internal simulator before programming your target device.

Is the clock internal (4MHz) or an external one?
 
"swanny" <blahgswan3blah@blahbigpondblah.comblah.blahau> wrote in message
news:hK7al.9831$cu.330@news-server.bigpond.net.au...

The MPLAB tools are free from the Microchip website. These will allow you
to
write and assemble programs for PIC microcontrollers, as well as debug
them in
an internal simulator before programming your target device.

Is the clock internal (4MHz) or an external one?
Just downloaded it and will give it a shot. There is an external clock,
4.000mhz.
 
On Jan 10, 10:20 pm, "What The" <n...@none.com> wrote:
"David L. Jones" <altz...@gmail.com> wrote in messagenews:a26c14b9-261e-4248-bdcd-ee57a68640d1@40g2000prx.googlegroups.com...



It should be correct, but not all HEX files contain the appropriate
configuration fuse info required to set the PIC up correctly
(oscillator source, interrupts, watchdog timer etc). It all depends on
if the original programmer included those (a good programmer would
have). You can check and set them manually in the programmer, but you
have to know what they are originally supposed to be.

Thanks Dave,

I also have the ASM source here from the Siliconchip website (But no tools
to re-compile it, nor do i know how at this point).

When programming the chip there are 3 separate tabs in the software that can
be separately modified "code memory" "data memory" and "user ID memory".
When programming i had to program each of the 3 window separately to
completely program the chip as per the whole hex file. Programming juts the
code memory (as i initially did) made not changes to the data memory which i
initially thought was the reason it didn't work.
I just checked the ASM source code. The config bits are set in the
code by this line near the top:
" __config _XT_OSC & _WDT_OFF & _PWRTE_ON"

That means the correct (and required) config fuse settings will be
automatically compiled into the .HEX file. So there should be no
worries there, you should be able to just load the HEX file and
program.
But before you program check the chip config settings in your
programmer software, they should have been set to "XT_OSC" ON and
"WDT" set to OFF.

Unlikely to be the chip at fault, most likely a dodgy universal
programmer. What brand and model is it?

Dave.

The programmer is one of these, it ain't a cheap one (compared to some ebay
$15 jobs) so i hope its not considered 'too' dodgy. Although obviously its
not a $2000 one that RS sells. lol. I've had no issues with it for
programming the AM29F010 chips that i most commonly use, but its barely done
any work really.

http://www.mcumall.com/comersus/store/comersus_viewItem.asp?idProduct...
Ah yes, another "Willem" programmer knock-off. You are right in that
it's not "too dodgy", but is still a low end non-professional
programmer. Problems are to be expected.
If your chip doesn't program and read reliably in that then it's 99%
certain to be the programmer. The chips are usually go/no-go.

Dave.
 
On Jan 11, 7:25 am, "David L. Jones" <altz...@gmail.com> wrote:
On Jan 10, 10:20 pm, "What The" <n...@none.com> wrote:



"David L. Jones" <altz...@gmail.com> wrote in messagenews:a26c14b9-261e-4248-bdcd-ee57a68640d1@40g2000prx.googlegroups.com...

It should be correct, but not all HEX files contain the appropriate
configuration fuse info required to set the PIC up correctly
(oscillator source, interrupts, watchdog timer etc). It all depends on
if the original programmer included those (a good programmer would
have). You can check and set them manually in the programmer, but you
have to know what they are originally supposed to be.

Thanks Dave,

I also have the ASM source here from the Siliconchip website (But no tools
to re-compile it, nor do i know how at this point).

When programming the chip there are 3 separate tabs in the software that can
be separately modified "code memory" "data memory" and "user ID memory".
When programming i had to program each of the 3 window separately to
completely program the chip as per the whole hex file. Programming juts the
code memory (as i initially did) made not changes to the data memory which i
initially thought was the reason it didn't work.

I just checked the ASM source code. The config bits are set in the
code by this line near the top:
" __config _XT_OSC & _WDT_OFF & _PWRTE_ON"

That means the correct (and required) config fuse settings will be
automatically compiled into the .HEX file. So there should be no
worries there, you should be able to just load the HEX file and
program.
But before you program check the chip config settings in your
programmer software, they should have been set to "XT_OSC" ON and
"WDT" set to OFF.
I also noticed the source code is designed for the old 16F84, not the
16F84A.
It's defined in these lines here:
list P=16F84
#include "p16f84.inc"

I can't remember the exact difference between them but I think there
were some differences.
Doesn't explain your programmer going a bit flaky though.

Dave.
 
"David L. Jones" <altzone@gmail.com> wrote in message
news:ce109644-b457-47f9-b8a0-d27c73435ab0@u18g2000pro.googlegroups.com...
I also noticed the source code is designed for the old 16F84, not the
16F84A.
It's defined in these lines here:
list P=16F84
#include "p16f84.inc"

I can't remember the exact difference between them but I think there
were some differences.
Doesn't explain your programmer going a bit flaky though.

Dave.
The original kit may have been designed for that and they have simply not
updated the code on the website although providing a later model PIC with
the currently packaged parts. date code on the sticker on the pic indicates
middle of 2005 it was programmed.

I feel a little silly realising this now, however while researching this
stuff i have found that when a chip is set for code protection, it will read
all 0's, which is exactly what is happening to the original PIC. so maybe
its not "dead" afterall... there is an LM358 opamp on the board too which
i'm going to replace as its a cheap part just in case as it is in the path
of components that were damaged. Going to pickup a few bits and pieces to
play with the PIC i got anyways, make sure the program stuff is working etc.

Thanks.
 
On Jan 11, 9:46 am, "What The" <n...@none.com> wrote:
"David L. Jones" <altz...@gmail.com> wrote in messagenews:ce109644-b457-47f9-b8a0-d27c73435ab0@u18g2000pro.googlegroups.com...



I also noticed the source code is designed for the old 16F84, not the
16F84A.
It's defined in these lines here:
list P=16F84
#include "p16f84.inc"

I can't remember the exact difference between them but I think there
were some differences.
Doesn't explain your programmer going a bit flaky though.

Dave.

The original kit may have been designed for that and they have simply not
updated the code on the website although providing a later model PIC with
the currently packaged parts. date code on the sticker on the pic indicates
middle of 2005 it was programmed.

I feel a little silly realising this now, however while researching this
stuff i have found that when a chip is set for code protection, it will read
all 0's, which is exactly what is happening to the original PIC. so maybe
its not "dead" afterall...
Ah yes, it does that!
Simply disable to write protect bit in the programmer settings and try
again. The code itself doesn't know nor care if the write protect bit
is on or off.
Good programmers will write all the bits, verify them once, and *then*
program the write protect bit, making further readback or verification
impossible. But you can always erase and program over it again.

Dave.
 
"What The" <none@none.com> schreef in bericht
news:jraal.9858$cu.3849@news-server.bigpond.net.au...
"David L. Jones" <altzone@gmail.com> wrote in message
news:ce109644-b457-47f9-b8a0-d27c73435ab0@u18g2000pro.googlegroups.com...

I also noticed the source code is designed for the old 16F84, not the
16F84A.
It's defined in these lines here:
list P=16F84
#include "p16f84.inc"

I can't remember the exact difference between them but I think there
were some differences.
Doesn't explain your programmer going a bit flaky though.

Dave.

The original kit may have been designed for that and they have simply not
updated the code on the website although providing a later model PIC with
the currently packaged parts. date code on the sticker on the pic
indicates middle of 2005 it was programmed.

I feel a little silly realising this now, however while researching this
stuff i have found that when a chip is set for code protection, it will
read all 0's, which is exactly what is happening to the original PIC. so
maybe its not "dead" afterall... there is an LM358 opamp on the board too
which i'm going to replace as its a cheap part just in case as it is in
the path of components that were damaged. Going to pickup a few bits and
pieces to play with the PIC i got anyways, make sure the program stuff is
working etc.

Thanks.
You'd make sure that your programmer is set to the chip you're programming.
There are differences between original and -A devices that may cause
problems. Most programmers I know, are able to identify the inserted PIC.
There are known differences between the programming specifications of the
16F628 and the 16F628A. I'm not sure about the 16F84.

If you have the source code, it may be worthwhile to convert to the
16F628(A). It's a cheaper chip and not absolete.

petrus bitbyter
 
"petrus bitbyter" <pieterkraltlaatditweg@enditookhccnet.nl> wrote in message
news:4969cba0$0$14836$e4fe514c@dreader32.news.xs4all.nl...
You'd make sure that your programmer is set to the chip you're
programming. There are differences between original and -A devices that
may cause problems. Most programmers I know, are able to identify the
inserted PIC. There are known differences between the programming
specifications of the 16F628 and the 16F628A. I'm not sure about the
16F84.

If you have the source code, it may be worthwhile to convert to the
16F628(A). It's a cheaper chip and not absolete.

petrus bitbyter

Thanks petrus,

Yes the programmer won't let you do any operation until you have selected
the chip from the listings and it then shows a diagram of where it should be
placed in the ZIF to be properly read and whether or not an adapter is
required for the chip selected.

That's a possible solution to change the chip but at this point in time i'm
not sure if the problem is the PIC now. I have repalced the OP amp as well
as that is on the input signal path and the (failure to) function is the
same. I'm at the point now where it could be one of the transistors or
another small discrete component like a zener that is broken and to be
honest, i don't have the will to tear the thing apart to fix it and sell it
off. I was hoping it was an easy/cheap fix.

Thanks.
 
What The wrote:
....
honest, i don't have the will to tear the thing apart to fix it and sell it
off. I was hoping it was an easy/cheap fix.
Do you want to get rid of it as it is? Let me know ttp105 at yahoo.com.au if you want.

Tom
 
No thanks Tom, i'll probably put it into the box of parts to be scavenged
later or if i'm feeling really energetic i might have a closer look at it
one day. Thanks.

"Tom" <Tom@nospam.com> wrote in message news:4969dd7d$1@dnews.tpgi.com.au...
What The wrote:
...
honest, i don't have the will to tear the thing apart to fix it and sell
it off. I was hoping it was an easy/cheap fix.

Do you want to get rid of it as it is? Let me know ttp105 at yahoo.com.au
if you want.

Tom
 

Welcome to EDABoard.com

Sponsor

Back
Top