WinPicProg Forums Forum Index WinPicProg Forums
A forum to support WinPicProg
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Programming the 16F628

 
Post new topic   Reply to topic    WinPicProg Forums Forum Index -> Questions
View previous topic :: View next topic  
Author Message
mlawes



Joined: 13 May 2006
Posts: 5
Location: Mansfield

PostPosted: Sun May 14, 2006 10:23 pm    Post subject: Programming the 16F628 Reply with quote

I have been trying to program my first chip for the tutorial and have run into a problem. I bought a picallw programmer from Quasar and it appeared to happily download the code for the second part of the first tutorial (the first one with delays for the LED turn on/off). I put the chip into the circuit but no flashing LED.

After checking the circuit carefully and making sure I could read the program back OK I realised that I also had to program the config for the chip (to select internal osc etc.) The software which came with the programmer has an option checkbox for programming the config word when writing the code which was initially turned off. There is also a button to program the config word directly.

Having, apparently, programmed the config word (i.e. no error messages) I was then unable to program the chip again (basically a verify error indicating that the word read back was 3FFF when it should have been 3007). When I tried to write the config word again I also got an error saying the the word to write was 3D18 but what was read back was 3DFF. A blank check of the chip runs which suggests that the chip memory has been cleared.

I have since tried this with a brand new chip. Programmed the actual program area without problems but after writing the config word the chip appears to become unprogrammable.

I have reviewed the data sheet and, as far as I can see, for this chip I should be able to update the config word multiple times (unlike an OTP chip).

I have also checked that 3D18 leaves the program memory unprotected and this seems to be a correct value for what I want. The data sheet suggest that, on this chip, if you unprotect memory having once protected it, it clears the code so it then cant be read back again. The implication is that code can be protected and unprotected on this chip so I dont think that the config programming has just protected the memory.

I think I have a duff programmer but wondered if you had seen anything similar or if I was missing something really obvious or something that a previous user has seen.

Regards

Mark
Back to top
View user's profile Send private message
Nigel Goodwin
Site Admin


Joined: 03 May 2006
Posts: 135
Location: Lower Pilsley, North Derbyshire

PostPosted: Mon May 15, 2006 8:26 am    Post subject: Reply with quote

Does your programmer software allow you to set the config fuse from within the software?, if so try setting it there!.
Back to top
View user's profile Send private message Send e-mail
mlawes



Joined: 13 May 2006
Posts: 5
Location: Mansfield

PostPosted: Tue May 16, 2006 8:55 pm    Post subject: Programming 16F628 Reply with quote

There is a checkbox which suggest that it will blow the fuses as well as program the chip. The correct fuse value is loaded in with the program.

I may have tried this but I will certainly give it a whirl.

Thanks for the reply. I will let you know how I get on.
Back to top
View user's profile Send private message
mlawes



Joined: 13 May 2006
Posts: 5
Location: Mansfield

PostPosted: Sat May 20, 2006 8:08 pm    Post subject: Programming the 16F628 Reply with quote

I have now tried this with one of the chips it wouldnt program before and it makes no difference, sadly.

I have emailed the chap who does technical support on the programmer and code but not reply yet.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WinPicProg Forums Forum Index -> Questions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group