Can you post youre code!
I thought that was you that asked me for it. I emailed it to someone.
Here it is I had added a led to it just to make sure the chip was actually working but here it is.
Code:'12F675 @ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON TRISIO.0 = 0 'Set GPIO.0 to output. ANSEL.0 = 0 'Set GPIO.0 to digital GPIO.0 = 0 CMCON = 7 ' PortA Digital inputs VRCON = 0 ' Voltage reference disabled OPTION_REG.7 = 0 DEFINE OSCCAL_1K 1 INCLUDE "modedefs.bas" led2 var GPIO.1 loop: SerOut GPIO.0,N2400,["Hello World"] Pause 1000 SerOut GPIO.0,N2400,["abc",13,10] Pause 4000 high LED2 pause 500 LOW LED2 pause 500 high LED2 pause 500 LOW LED2 pause 500 GoTo loop
I Think your Oscal might be off or Lost!
Try this code below to see.
'Lost oscal recover program
' Use Hyper_Term settings "9600 N,8,1"
'
@ DEVICE pic12F675
@ DEVICE pic12F675, INTRC_OSC_NOCLKOUT
@ DEVICE pic12F675, WDT_OFF
@ DEVICE pic12F675, MCLR_OFF
@ DEVICE pic12F675, CPD_OFF
@ DEVICE pic12F675, BOD_OFF
@ DEVICE pic12F675, PWRT_ON
@ DEVICE pic12F675, PROTECT_OFF
SO VAR GPIO.0 ' serial out pin
ANSEL = 0 ' disable converters
CMCON = 7 ' disable comparators
OSCCAL = 0 ' starting value
Pause 2000
loop:
OSCCAL = OSCCAL + $10 ' increment calibration value
SerOut2 SO,16468,[HEX2 OSCCAL, " This is a close OSC Value!",10,13] ' Display the hex value
Pause 750 ' give time to read the value
GoTo loop ' do it forever
Ok I had to make a chane to get it to compile mine doesn't like how you did the defines but here it is
@ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON & _CP_OFF & _CPD_OFF
SO VAR GPIO.0 ' serial out pin
ANSEL = 0 ' disable converters
CMCON = 7 ' disable comparators
OSCCAL = 0 ' starting value
Pause 2000
loop:
OSCCAL = OSCCAL + $10 ' increment calibration value
SerOut2 SO,16468,[HEX2 OSCCAL, " This is a close OSC Value!",10,13] ' Display the hex value
Pause 750 ' give time to read the value
GoTo loop ' do it forever
I setup hyperterm with the settings you said and then set it to vt100 as well? its running now will let you know how it does.
Also I should be using pin 2 on serial as the input? and pin 5 to ground?
The Gpio.0 ---->1k resistor---->pin 2 on a DB9 "rxpin" --->computer
Ok cool I left it running for a while and got
80
90
A0
B0
all close so how do I program that into the chip?
I mean permanitly because I think I lost it on a number of chips when I very first started.
Using Pic Kit 1 I don't see a way to manually set it.
Last edited by geckogrotto; - 4th September 2006 at 03:47.
Bookmarks