PDA

View Full Version : Help on PIC12C509



kasamiko
- 9th May 2005, 17:23
Please help me get started writing a code that will do this..
Target uC PIC12C509..

GPIO2 will go HI for 10 seconds then LOW for 3 seconds then
GPIO1 will go HI for another 10 seconds and LOW for 3 seconds then repeat until
GPIO3/MCLR goes to LO..

How can I do this in BASIC??

TIA

rhonn

NavMicroSystems
- 9th May 2005, 19:10
REPEAT
HIGH GPIO.2
PAUSE 10000
LOW GPIO.1
PAUSE 3000
HIGH GPIO.1
PAUSE 10000
LOW GPIO.1
PAUSE 3000
UNTIL GPIO.3=0


But you should have a look at your PBP MAnual and the BLINK.BAS example

kasamiko
- 10th May 2005, 09:46
Hi,
I tried simulating it in Proteus..using the schematic attached..
Is it correct? I got this error:

[U1] Loading HEX file 'TIMER2.HEX'.
FATAL: [U1] Program or EEPROM data has invalid address [0FFF] for this device

What's wrong?