Conditional Compilation
Unsoundcode
Posts: 1,532
Hi, I want a time out value for a SERIN instruction that·is value dependant on the the baudrate.
I want it to be·independent of which kind of Stamp I use.
I can write code for this but want it to be part of·a compiler directive I can use for different programs and different Stamps where when I choose a baudrate the timeout is automatically chosen.
Can anyone tell me what might be the best way to tackle this.
thanks
Jeff T.
I want it to be·independent of which kind of Stamp I use.
I can write code for this but want it to be part of·a compiler directive I can use for different programs and different Stamps where when I choose a baudrate the timeout is automatically chosen.
Can anyone tell me what might be the best way to tackle this.
thanks
Jeff T.
Comments
#DEFINE baud_value=16390· 'alter value to suit
#SELECT baud_value
#CASE 16390
time_out CON 20
baud CON 16390
#CASE 16468
time_out CON 30
baud CON 16468
#CASE 16572
time_out CON 40
baud CON 16572
#ENDSELECT
Jeff T.