binary1248
Senior Member
When I use sertxt in this program, the first two ascii charcters are messed up.
But if I create a simple program to test the sertxt at the same baud rate it works ok.
I have tried many variations, but the first two characters are messed up.
This is what comes out on the terminal display:
I have a large delay between sertxt occurances.
.
Here is the code:
But if I create a simple program to test the sertxt at the same baud rate it works ok.
I have tried many variations, but the first two characters are messed up.
This is what comes out on the terminal display:
I have a large delay between sertxt occurances.
.
Code:
[00]u[B4]e Value of B10 is==> 14 Var_out is==> 121
[00]u[B4]e Value of B10 is==> 16 Var_out is==> 122
[00]u[B4]e Value of B10 is==> 18 Var_out is==> 123
[00]u[B4]e Value of B10 is==> 20 Var_out is==> 124
[00]u[B4]e Value of B10 is==> 22 Var_out is==> 125
[00]u[B4]e Value of B10 is==> 24 Var_out is==> 126
[00]u[B4]e Value of B10 is==> 26 Var_out is==> 127
[00]u[B4]e Value of B10 is==> 2 Var_out is==> 55
[00]u[B4]e Value of B10 is==> 4 Var_out is==> 55
[00]u[B4]e Value of B10 is==> 6 Var_out is==> 55
Code:
#rem
Speed test for read byte from table (eeprom) and write byte to port b
c\users\paul\desktop\
Feb 21 2017 PEH
Make b.0 thru b.7 output byte port
#endrem
#picaxe 20X2
;setfreq m64 '64mhz,
'#no_data 'save some load time for now
;#no_table
#terminal 9600
symbol clk0=C.0 ;pin 10 on chip, strobe DAC load pin
symbol var_out=b0 ' byte to recieve data from eeprom
'
let dirsB = %11111111 ; 7 tru 0 as outputs
let dirsA = %00000001 ;also port a for control signals out
let dirsC = %11111111 ;and port c
; HORZ is upper left screen, 255 ,255 is lower right, first digits of pair is VERT, 2nd digit is HORZ
TABLE 0,(1,55,1,55,1,55,1,55,1,55,120,120,121,121,122,122,123,123,124,124,125,125,126,126,127,127,128,128,129,129,130,130,131,131,132,132)
let pinsc = %10000001 ;preset write pin high and set HV on (C.7)
repeat_all:
let B10=0 ;set intial location adx
notdone:
low A.0 ;select DAC a, X2 signal, Horz
readtable B10,var_out ;read a byte to send to DAC, first byte of two
let pinsb=var_out ;......bit 0 is b.0,bit 1 is b.1 etc , write vertical DAC
pulsout C.0,1 ; send a 500 ns pulse out of pin B.1 (cause we are at 64mhz)
high A.0 ;select DAC B, y2 signal, Vertical
inc B10
readtable B10,var_out
let pinsb=var_out ;......bit 0 is b.0,bit 1 is b.1 etc , write Horz DAC
pulsout C.0,1 ; send a 500 ns pulse out of pin B.1 (cause we are at 64mhz)
inc B10
;
'Hit F8 to bring up text screen
sertxd ("The Value of B10 is==> ",#B10," Var_out is==> ",#var_out,13,10) ;In serial term window set baud rate to compensate for 64mHz later
pause 1000 'slow to read values
if B10>24 then goto repeat_all
goto notdone