getting serial out to work
I'm running a Propeller ASC+ board running a program that does the following:
1: takes a squarewave input
2: measures the time between highs of the square wave
3: uses that time period to determine the speed at which two LED's blink
Unfortunately I'm running into two problems
1: my propeller board doesn't accept the incoming signal on pin 8
2: the serial port WILL NOT SEND ANYTHING to the screen (anything readable that is)
what I have already checked :
here is my main program
// edit, after making some changes I discovered that I can now print to the serial port, but all I get is the value of the final digit in delay, regardless of what value I enter into delay
1: takes a squarewave input
2: measures the time between highs of the square wave
3: uses that time period to determine the speed at which two LED's blink
Unfortunately I'm running into two problems
1: my propeller board doesn't accept the incoming signal on pin 8
2: the serial port WILL NOT SEND ANYTHING to the screen (anything readable that is)
what I have already checked :
- it is on the correct serial com port
- it is on the correct baud frequency
- the clock speed is set correctly (I think)
here is my main program
CON _CLKMODE = xtal1 + pll16x
_xinfreq = 5_000_000
MAXLEDS = 2
OBJ
'PUSEIN : "pulse"
'FREQ : "ADC_FREQ_READ"
FREQ : "jm_freqin"
SERIAL : "FullDuplexSerial"
LED[2] : "outobj"
VAR
long delay
long stack[9]
PUB main
SERIAL.start(31,30,0,115200)
FREQ.init(8)
cognew(freqcog, @stack)
DIRA[13..12]~~
LED[nextobject].start(13,@delay,0,1)
LED[nextobject].start(12,@delay,0,2)
repeat
PUB nextobject : index
repeat
repeat index from 0 to MAXLEDS-1
if not LED[index].active
quit
while index == MAXLEDS
PUB freqcog
repeat
delay := FREQ.freq
SERIAL.dec(delay)
waitcnt(clkfreq +cnt)
while 1
// edit, after making some changes I discovered that I can now print to the serial port, but all I get is the value of the final digit in delay, regardless of what value I enter into delay
