PDA

View Full Version : 12c508a Device Config. And Burning Issues



sayzer
- 28th March 2006, 17:02
I have been burning lots of 508A for a simple project and yet have enough to make a necklace.

I have four input buttons to ground with 4.7K resistors to pull up, and two outputs.

This takes case of it: TRISIO=%001111

However, I can not get the chip programmed. I get different programming errors each time I try programming and then chip gets burned.

Should I use some kind of device option to solve burning problem?

Also, what are the device options for 12C508A, if anyone knows? The ones I use are as follows.

@ DEVICE intrc_osc, MCLR_OFF,WDT_OFF,PROTECT_ON

Also, what do I need to do with defining oscal value? What is the correct one?

Thanks in advance.

mister_e
- 28th March 2006, 17:16
Before you waste much money on those, may i suggest you to buy a couple of 12F508? OR using a JW version wich you'll be able to erase and reprogram later?

NOW, all config fuses are listed in the INC file in the PBP\INC folder


EXTRC_OSC equ 0FFC0003h ; XXXX XXXX XX11
INTRC_OSC equ 0FFC0002h ; XXXX XXXX XX10
XT_OSC equ 0FFC0001h ; XXXX XXXX XX01
LP_OSC equ 0FFC0000h ; XXXX XXXX XX00
WDT_ON equ 0FFB0004h ; XXXX XXXX X1XX
WDT_OFF equ 0FFB0000h ; XXXX XXXX X0XX
PROTECT_OFF equ 00170FE8h ; 1111 111X 1XXX
PROTECT_ON equ 00170000h ; 0000 000X 0XXX
MCLR_ON equ 0FEF0010h ; XXXX XXX1 XXXX
MCLR_OFF equ 0FEF0000h ; XXXX XXX0 XXXX


12C508 is a huge 512 Byte device.. none of the PBP definition will work. As i'd never felt the use of those for any accurate delay using the internal RC OSC, i'd never set the internal OSCCAL. but i'll bet on something like..


@ device pic12C508A, INTRC_OSC, MCLR_OFF,WDT_OFF,PROTECT_OFF
@ movwf OSCCAL


NOW, will this work as I suppose to in conjuction of all PBP stuff 'round. Bruce, Darrel will tell.

sayzer
- 29th March 2006, 07:31
Thank you Steve.

As you recommended, I have already tried my code on Flash ones and had no problem. I even used the code with F675 with more complex device configurations as you may guess, and had no problem.

Now the code uses "371 words" and fits into C508. However, even though I tried my best in configuring the device settings at trial and error thingy, still C508 gets burned while Flash ones gets successfully programmed.

Melanie
- 29th March 2006, 08:35
There is a 12F508... you can erase and reprogram that as many times as you want. Then, with the code working, you can burn your 12C508's safe in the knowledge that they're not going to be wasted.

mister_e
- 29th March 2006, 16:50
As you said it works with F508 but not with C508... i may bet on your programmer but unsure. Just do some test here with both of my programmer.. no problem. ARRGH!