hser recieving serial

johnlong

Senior Member
Hi All
Have being playing around with the Dorji DRF1278DM with the intention of using it
for a battery powered remote sensor unit
I have the units talking to each other with the following using the 9600 braud rate
Code:
high b.7
home:
	
	do
	serin  A.0,T9600,b0  
	pause 450
	sertxd(#b0," ")
	if b0=100 then
		goto light
		endif
	loop
light:

	toggle b.6
	toggle b.7
	goto home
#rem	
high b.6
	do
	for b0=1 to 100
		serout C.6,T9600,(b0)
		pause 500
		pulsout B.7,1000
next b0
toggle b.6
	loop
just toggling leds at both ends
My question is I have used the following without sucess
Code:
'Waking up the 28x2 with the dorji DRF1278DM



#Picaxe 28X2 '
'Master 40x2
	serout A.0,9600,("ZZZZZZZZ")
'slave 28x2
top:
hsersetup   B9600_8,%10
 
HIntSetup %00100001
SetIntFlags %00000001, %00000001
disablebod
sleep 0 'sleep until interrupt occurs to save battery power
enablebod
goto top
Interrupt:
	setintflags off
  hsersetup off ' Master is using the hser pins to run nextion display
  hserFlag = 0
  flag0=0
  sertxd("IN Interrupt")
  'read sensors serial out values to master via serial commands
  SetIntFlags %00000001, %00000001
  Return
Is the problem just a timing issue or is the approch (miss interputation of the manual) wrong for waking up the slave
I can not use the hserin/out from the master as they controll the nextion display
any comments welcome
regards john
 
Top