PDA

View Full Version : Testing PIC16F628A with one LED - Which PCB and fuses?



ley0
- 12th May 2008, 17:21
Hi!

For my 16F628A PIC, I made a simple circuit based on:
http://walter.schreppers.com/files/flash628_schematic.gif
But I get no life signs.

I wonder what is the most common Config for Fuses.
My fuses are set with no external clock or MCLR, and I've tried WDT On or Off. My current is USB power (~ 4.7V).
This is exactly the same power that I use to write and read EEPROM 24Cxx I2C.
I've tried a lot of capacitors (From 1n to 100n) near of the PIC chip.
When I program the PIC with a JDM-kind programmer, all is ok and acknowledges everything,
but when I put it on a solderless board, I can't find any way to light the led, as if the PIC wasn't running at all.

And nothing is working!

skimask
- 12th May 2008, 17:24
This is PicBasicPro, not Proton Basic...

Archangel
- 13th May 2008, 00:45
Hi!

For my 16F628A PIC, I made a simple circuit based on:
http://walter.schreppers.com/files/flash628_schematic.gif
But I get no life signs.

I wonder what is the most common Config for Fuses.
My fuses are set with no external clock or MCLR, and I've tried WDT On or Off. My current is USB power (~ 4.7V).
This is exactly the same power that I use to write and read EEPROM 24Cxx I2C.
I've tried a lot of capacitors (From 1n to 100n) near of the PIC chip.
When I program the PIC with a JDM-kind programmer, all is ok and acknowledges everything,
but when I put it on a solderless board, I can't find any way to light the led, as if the PIC wasn't running at all.

And nothing is working!
This should get you started, <br> http://www.picbasic.co.uk/forum/showthread.php?t=561
http://www.picbasic.co.uk/forum/showthread.php?t=543
http://www.picbasic.co.uk/forum/forumdisplay.php?f=16

ley0
- 13th May 2008, 01:28
Hi

This is now ok, I was writing "$FF" for output in the TRISA instead of 0.
But now I have broken a PIC16f628A. When I program it with the WinPic800 software, it says "Error: writing 0x(a size of data) reading 0x0000.....
I've programmed another with the OPTION_REG, that I changed, re-set to 80 and it's ok.

I'll have to understand how function these i/o, fuses and the internal clock.

Thank!

Archangel
- 13th May 2008, 01:52
For PM assembler use:


@ DEVICE pic16F628A, HS_OSC

@ DEVICE pic16F628A, WDT_ON
' Watchdog Timer

@ DEVICE pic16F628A, PWRT_ON
' Power-On Timer

@ DEVICE pic16F628A, MCLR_OFF
' Master Clear Options (Internal)

@ DEVICE pic16F628A, BOD_OFF
' Brown-Out Detect

@ DEVICE pic16F628A, LVP_OFF
' Low-Voltage Programming

@ DEVICE pic16F628A, CPD_OFF
' Data Memory Code Protect
' Set to CPD_OFF for Development Copy
' Set to CPD_ON for Release Copy

@ DEVICE pic16F628A, PROTECT_OFF
' Program Code Protection
' Set to PROTECT_OFF for Development Copy
' Set to PROTECT_ON for Release Copy

For MPASM Assembler Use:



@ __config _HS_OSC & _WDT_OFF & _PWRTE_ON & _LVP_OFF & _BODEN_OFF

XT_OSC for slow "4MHZ", HS_OSC for faster if using xtals or resonators.
'
I never could get WIN800 to work with my JDM clone, I use ICPROG and it works lovely, It's free too.

Ted's
- 13th May 2008, 01:58
I was using exactly your pic long ago. Try



@ DEVICE MCLR_OFF
@ DEVICE hs_osc
@ DEVICE wdt_off
@ DEVICE lvp_off
@ DEVICE protect_off