Searching \ for '[PIC]: 18F Programing problems.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=18F
Search entire site for: '18F Programing problems.'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: 18F Programing problems.'
2005\07\22@055818 by Peter Onion

flavicon
face
I'm having trouble getting my programmer to actually write to a 18F
device.

It can read the ID bytes correctly,
It can read the config bytes correctly (they are at the default "erased"
values),
It can read the code memory from an already programmed device.

What value should it read from the code memory of a brand new device ?
I'm getting all zeros and I expected all ones.

Also it always reads zeros from the code memory even after running "bulk
erase" and programming.

I've even resorted to looking at the clock and data signals on a 'scope
and all looks good.

Are there any "gotchas" in the programming guide ?

Peter Onion.




2005\07\22@071420 by Jinx

face picon face

> I'm having trouble getting my programmer to actually write to
> a 18F device

The only thing I can think of, with a PS+, is needing to Erase
Flash Device before Program

2005\07\22@100956 by PicDude

flavicon
face
What programmer/software?


On Friday 22 July 2005 04:58 am, Peter Onion scribbled:
{Quote hidden}

2005\07\22@103624 by Peter Onion

flavicon
face
On Fri, 2005-07-22 at 09:17 -0500, PicDude wrote:
> What programmer/software?
>

"I'm having trouble getting **my** programmer ........"

I've been looking at the sources for several other programmers and I
can't *see* anything different between what mine does and what the
others do (same PIC commands in the same sequence).  I'll have to get
the scope out again and check more closely the timings on the clock and
data signals and the Vdd and Vpp signal voltages.

Peter


2005\07\22@110231 by Jan-Erik Soderholm

face picon face
Peter Onion wrote :

>
> "I'm having trouble getting **my** programmer
........"
>

Well, I don't know, but maybe there *is* a reason
that
most just uses a programmer designed and
tested by someone else.


Best
Regards,

Jan-Erik.



2005\07\23@064032 by Peter Onion

flavicon
face
On Fri, 2005-07-22 at 15:36 +0100, Peter Onion wrote:
> On Fri, 2005-07-22 at 09:17 -0500, PicDude wrote:
> > What programmer/software?
> >
>
> "I'm having trouble getting **my** programmer ........"

Well after much head scratching and pulling out of hair it is working
(for small values of working) in that it has written a count to the
first 8 bytes of the code memory.

I'm not sure what the problem was in the end, infact I think there were
several !  Mind you, the fact that my "waitWms" function failed with W=1
didn't help !  Also looking at the Wouters code in wisp628.jal seems to
suggest that some of the steps in the programming specification aren't
needed (some of the twiddling of bits in EECON1 before configuring for
single pannel writes for example).

I've got code running in the PC end to load .hex files so it (should) be
an easy step now to actually program a 18F458 to "blink a led".

Anyway, I need to go and do something else now before my eyes turn
square from looking at these LCDs for too long !

Peter :-)

2005\07\26@044006 by Wouter van Ooijen

face picon face
> Also looking at the Wouters code in
> wisp628.jal seems to
> suggest that some of the steps in the programming specification aren't
> needed (some of the twiddling of bits in EECON1 before configuring for
> single pannel writes for example).

I you are brave you can take the programming specs at the same level as
the self-programming examples in the datasheet: probably correct (for
small values of probable), but not necesarry the way you would do it.
And you of course realised that you are just force-feeding instructions
to the CPU.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\07\26@044007 by Wouter van Ooijen

face picon face
> What value should it read from the code memory of a brand new device ?
> I'm getting all zeros and I expected all ones.

I recall having a similar problem when I first started programming 18F's
but I can't remember exactly, nor what the cause or solution was. But I
strongly recommend that you get a known working programmer, program the
PIC with it, and then try to read it with your own
progger-in-development.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2005\07\26@051740 by Peter Onion

flavicon
face
On Tue, 2005-07-26 at 10:40 +0200, Wouter van Ooijen wrote:

> I you are brave you can take the programming specs at the same level as
> the self-programming examples in the datasheet: probably correct (for
> small values of probable), but not necesarry the way you would do it.
> And you of course realised that you are just force-feeding instructions
> to the CPU.

I've not looked at "self programming" techniques at all ... yet.  But
boot loaders are getting close to the top of my "interseting things to
investigate" list.   My programmer is now working  nicely for 18F
devices.  I can now start to investigate using sdcc.

Peter  

2005\07\26@052136 by Peter Onion

flavicon
face
On Tue, 2005-07-26 at 10:40 +0200, Wouter van Ooijen wrote:

> I recall having a similar problem when I first started programming 18F's
> but I can't remember exactly, nor what the cause or solution was. But I
> strongly recommend that you get a known working programmer, program the
> PIC with it, and then try to read it with your own
> progger-in-development.

Luckily I have a programmed 18F452 in one of these...
http://www.crownhill.co.uk/product.php?
prod=1306&PHPSESSID=2b7a27e382006f133bc20b6f274ee9df

So I could check the "read back" was working in my programmer.

Peter



More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...