PDA

View Full Version : Problem with Picbasic Pro and PIC10F202, PIC10F206



mikaljan
- 11th May 2005, 18:31
I'm using the following:
(1) PICBASIC PRO 2.45 (Updated with PIC10F Library)
(2) meLAB Serial Programmer
(3) PIC10 Adaptor which I made by myself for PDIP Package(http://users.adelphia.net/~mjan/PIC10F20x.jpg)

Even with such a simple program as following, the chip doesn't even run:

MAIN:
LOW GPIO.0
SLEEP 1
HIGH GPIO.0
SLEEP 1
GOTO MAIN
END

The programming process went perfectly fine, The chip was verified and the code was in there. I was able to do all the normal functions such as ERASE, Check Blank, READ...etc.

The chip was programmed with the following Configuration:
Watchdog Timer: Enabled
MCLR Pin Function: Input Pin
Code Protect: OFF

However, when I hook up the chip: 5V -> Vdd, GND -> Vss, and oscilliscope to GPIO.0, I didn't see any wave form. The output of GPIO.0 is just a logic '0'.

I'm not sure what's wrong with it. I tried this on PIC10F202, and also PIC10F206, both gave me the same result. Are there anyone that successfully got PIC10F20x working? Thanks for your help!

Bruce
- 11th May 2005, 21:01
You don't want to use the PBP sleep command on any
PIC that generates a "device reset" on wake-up via the
WDT.

GPIO stays at logic 0 because the WDT timeout causes
a device reset after the 1st sleep period expires.

Try replacing sleep with a short pause, and see if it works.

Dwayne
- 11th May 2005, 21:02
Hello Mika,

M>>MAIN:
LOW GPIO.0
SLEEP 1
HIGH GPIO.0
SLEEP 1
GOTO MAIN
END
<<

You need to go to the data sheet...
You have not set your pins to all output.
You have not turned off your comparitor.

TRISIO=%00000000 SEtting your pins to output ((not digital))
eventhough HIGH and LOW automatically set your pins to outputs, I have a habit of doing it anyhow...Because I use the value of 1 and 0.
CMCON0=7 turning off the comparitors

Instead of sleep, I would use Pause 500.

See this thread:
http://www.picbasic.co.uk/forum/showthread.php?t=1640&highlight=blink%2A

Dwayne