I am having problem when I used print command with SPI it dosn't work
$regfile = "m8def.dat"
$crystal = 40000000
$baud = 9600
$hwstack = 32
$swstack = 20
$framesize = 80
'********************************************************************************
'Here I am calling SPI routine to collect data from a 24 bit register from metering IC ADE7753
'and keeping it in 3 byte array
'********************************************************************************
R_add = &H02
Call R_chip(r_add)
Locate 1 , 1
Lcd "ANERGY= " ; Hex(r_data(1)) ; Hex(r_data(2)) ; Hex(r_data(3))
'********************************************************************************
'Some of the register I want to send to PC only, This don't work at I get garbage on PC at lower
'baud rate setting say 4800 , I check my hardware on simple serial communication program
' By sending " Hello World" I works perfectly O.K.
'*******************************************************************************
R_add = &H0C
Call R_chip(r_add)
Print "RSTSTATUS = " ; Hex(r_data(1)) ; Hex(r_data(2))
Waitms 50
[b:950f424b31][color=red:950f424b31](BASCOM-AVR version : 2.0.7.5 , Latest : 2.0.7.6 )[/b:950f424b31][/color:950f424b31]
↧