Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Miracles DO happen !

Status
Not open for further replies.

riv503ca

New Member
The Boston Bruins are in the second round of the play-offs and my first
Basic program actually works! !

'SYMBOLS

Symbol led = RB0 'Define RB0 as LED

'START OF MAIN PROGRAM

TRISB = %11111110 ' Setup port b as RB7-RB1 inputs, RB0 as output
main: ' Label for beginning of main loop
High led ' Set pin 0 of portb high (5 volts) which turns the LED on
WaitMs 1000 ' Wait1000 milliseconds (1 second) with LED on
Low led ' Set pin 0 of portb low (0 volts) which turns the LED off
WaitMs 1000 ' Wait for 1 second with LED off
Goto main ' Jump to the main label and do it all again and again

End
The above turned into 119 lines in the LST file which, when
imported into MPLAB, built with a dozen errors and a ton of
warnings (naturally), then programmed into a PIC16F819
with an ICD2. Thank you much for all your help! :) :)
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top