SERIN on SIN
Good Afternoon everyone,
I am trying to talk from one stamp on the PDB through the level shifter to another stamp on a seperate board through the programing port.· I can command the seperate board no problem using the debug window, but when I try to command it from the stamp on the PDB through the level shifter I get nothing.· I have scoped both transmissions; the timing and·levels ·of both transmissions are identical.· Any sugestions?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are 10 types of people that understand binary, those who do, and those who don't.
I am trying to talk from one stamp on the PDB through the level shifter to another stamp on a seperate board through the programing port.· I can command the seperate board no problem using the debug window, but when I try to command it from the stamp on the PDB through the level shifter I get nothing.· I have scoped both transmissions; the timing and·levels ·of both transmissions are identical.· Any sugestions?
'File:Relay_Test_Slave
'Date:31MAR09
' {$STAMP BS2}
' {$PBASIC 2.5}
'-----Program Description---------------------------------------------------------------------
'-----Pin Declarations------------------------------------------------------------------------
'-----Variables-------------------------------------------------------------------------------
relay VAR Byte
'-----Constants-------------------------------------------------------------------------------
Baud CON $4054
'Baud CON 84
TimeOut CON 2000
Rx CON 16
Tx CON 16
'-----EEPROM Data-----------------------------------------------------------------------------
'-----Initialization--------------------------------------------------------------------------
OUTH = %00000000
DIRH = %11111111
'-----Program---------------------------------------------------------------------------------
Main:
DO
SERIN Rx, Baud, TimeOut, Blink, [noparse][[/noparse]DEC4 relay]
SEROUT Tx, Baud, [noparse][[/noparse]DEC5 relay]
OUTH = ~relay
LOOP
'-----Subroutines-----------------------------------------------------------------------------
Blink:
'OUTH = $10
'PAUSE 200
'OUTH = $00
GOTO Main
'File:Relay_Test_Master
'Author:
'Date:
' {$STAMP BS2}
' {$PBASIC 2.5}
'-----Program Description---------------------------------------------------------------------
Rx PIN 0
Tx PIN 1
'-----Pin Declarations------------------------------------------------------------------------
'-----Variables-------------------------------------------------------------------------------
celsius VAR Word
relay VAR Byte
repeat VAR Word
'-----Constants-------------------------------------------------------------------------------
'Baud CON $4054
Baud CON 84
TimeOut CON 2000
EndL CON 10
'-----EEPROM Data-----------------------------------------------------------------------------
'-----Initialization--------------------------------------------------------------------------
relay = 0
DIRL = %00000011
'-----Program---------------------------------------------------------------------------------
DO
SEROUT Tx, Baud, [noparse][[/noparse]$35, CR]
PAUSE 1000
LOOP
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are 10 types of people that understand binary, those who do, and those who don't.
Comments
-Phil
I believe I have already tried using 84 for both units and still nothing.· I will try again though to double check, and let you know.· Won't be until Monday though.· Thanks again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are 10 types of people that understand binary, those who do, and those who don't.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are 10 types of people that understand binary, those who do, and those who don't.