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.