« PIC with Transistors | Main | Baseline code »

December 07, 2004

JUST LIGHT THE LED, DARN IT

just lights an LED

'****************************************************************
'* Name : robot_motorc.BAS *
'* Author : translaton of Christina Goodness BX Code, Carlyn Maw
'* Notice : Copyright (c) 2004 *
'* : All Rights Reserved *
'* Date : 4/16/2004 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************

DEFINE OSC 4
' ----------------------------------------------------- PORT SET-UP
'set port b to output:

TRISB = %00000000
TRISD = %00000000

'serial
TRISC = %10000000
tx var portc.6 'out
rx var portc.7 ' in

' ----------------------------------------------------- CONSTANTS
'serial
inv9600 con 16468 ' baudmode (9600 8-N-1 inverted)
basicSpeed con 100 ' used in IR detection
' ----------------------------------------------------- VARIABLES

' ----------------------------------------------------- FAKEDATA

' ----------------------------------------------------- START MAIN

'startup sequence
HIGH PORTD.2
Pause 1000
LOW PORTD.2
Pause 1000
HIGH PORTD.2


main:


'get values


'debug sensor infomation
''for somereason this seems to lock up for a while
'SEROUT2 tx, inv9600, ["helllllloooooo", 13,10]

HIGH PORTD.3

goto main

Posted by cm1002 at December 7, 2004 07:08 PM

Comments

Post a comment




Remember Me?