Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

simple program with 12F629

Status
Not open for further replies.

deniah

Member level 4
Joined
Nov 28, 2005
Messages
74
Helped
6
Reputation
12
Reaction score
5
Trophy points
1,288
Location
Montenegro
Activity points
1,777
12f629 simple

Hello

I need som help with this program.
It should work like this: when power on, GPIO.2 is high. When apply HI on GPIO.0, after 3 sec GPIO.2 should be low.
Config is mclr=off, pwrt=on, wdte=on,boren=on, int OSC I/O.

I'm using Microcode studio with PicBasic Pro compiler

Here is the code

Code:
CMCON=7

ul var GPIO.0 'Define GPIO.0 pin as ul
izl VAR GPIO.2 'Define GPIO.2 pin as izl

High izl
Input ul

loop:
if ul=1 then
pause 3000
low izl
end if
goto loop
 

set osc 12f629

Config is mclr=off, pwrt=on, wdte=on,boren=on, int OSC I/O.

i think you should set WDT off. otherwise the pic will get rest at the middle of the program. OR you should issue the CLRWDT to clear wdt to ensure no reset due to WDT overflow.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top