MrDEB
Well-Known Member
I am in the learning stage of Swordfish and trying to learn how to use the USART and CONST
Using Jubebug connected to daughter board via ICSP port.
Have all the dip switches OFF
powering ON then opening the USART tool in Pickit2
The LED on port B.0 flashes at 1 second intervals
LED on port B1 stays ON
NO display on the pc screen
Using Jubebug connected to daughter board via ICSP port.
Have all the dip switches OFF
powering ON then opening the USART tool in Pickit2
The LED on port B.0 flashes at 1 second intervals
LED on port B1 stays ON
NO display on the pc screen
Code:
device = 18F1320
clock = 8 // 8MHz clock
config OSC = INTIO2, WDT = OFF, LVP = OFF
include "internalOscillator.bas"
include "USART.bas"
include "Convert.bas"
include "Utils.bas"
include "string.bas"
dim LED as PORTB.0
dim Index as byte
const ConstArray(2) as byte = (100, 200)
// main program...
OSCCON = $72
//ADCON1 = $7f
SetAllDigital
// display value to terminal program, include
// CR and LF
SetBaudrate(br9600)
for Index = 0 to bound(ConstArray)
USART.Write(DecToStr(ConstArray(Index)), 13, 10)
high(LED)
repeat
toggle (LED)
delayms (1000)
until false
next