Attribute VB_Name = "Module1" ' txm433_test.bas ' This sets up the pins for the TXM module to send out serial ' data that will be driven into the data pin of the TXM-433 ' wireless transmitter module. This program uses the "open" ' command to set up a software UART on Port A0. You must set ' the baud rate (below set for 300 for max range). ' Pin assignment: ' TXM-433 header ' 1 - Ground ' 2 - Vcc (note:there's a 10ohm series R from 5V w/decoupling cap 4.7uF) ' 3 - Vadj (430 ohm R to ground) ' 4 - Data (Port A0, so if you use the TXM you cannot use channel 0 for ADC) ' put in the cal value for your part here (marked on the 8535 case ' most are hex 9F, some 91's and some in between Osccal = &HXX $crystal = 8000000 'change to the value of the XTAL you have installed Osccal = & Dim Num As Byte 'Optional you can fine tune the calculated bit delay 'Why would you want to do that? 'Because chips that have an internal oscillator may not 'run at the speed specified. This depends on the voltage, temp etc. 'You can either change $CRYSTAL or you can use 'BAUD #1,9610 'In this example file we use the DT006 from www.simmstick.com 'This allows easy testing with the existing serial port 'The MAX232 is fitted for this example. 'Because we use the hardware UART pins we MAY NOT use the hardware UART 'The hardware UART is used when you use PRINT, INPUT or other related statements 'We will use the software UART. Waitms 100 'open channel for output Open "coma.0:300,8,n,1" For Output As #1 Num = 0 ' this just prints a string of numbers out the port. you can set up a recevier ' on hyperterminal and put the darc board/tx unit progressively further away and ' then check if you're still getting data through. Do Print #1, "# "; Num Incr Num Loop End