Basic Stamp - Javelin compalility
Hello,
I have a strange problem. I have built a small board with a 28pin connector and a radio modem (TRS400 from Low Power Radio Solutions). I have done some programming with the BS2e in the socket and it all works fine, but when I replace the BS2e with my Javelin nothing works.
I can't send or receive using the radio modem. The Javelin outputs the correct signals but its never transmitted or received. If i replace the radio module with a ttl to RS232 converter i can see the data.
So my question is:
Do I need to do anythin with the signal between the Javelin and the modem that i don't hav eto do on the BS2e?
I tried with a pull down resistor (10KOhm) but that didn't change anything.
I want to use my Javelin but i'm getting a bit frustrated now...
/Magnus
I have a strange problem. I have built a small board with a 28pin connector and a radio modem (TRS400 from Low Power Radio Solutions). I have done some programming with the BS2e in the socket and it all works fine, but when I replace the BS2e with my Javelin nothing works.
I can't send or receive using the radio modem. The Javelin outputs the correct signals but its never transmitted or received. If i replace the radio module with a ttl to RS232 converter i can see the data.
So my question is:
Do I need to do anythin with the signal between the Javelin and the modem that i don't hav eto do on the BS2e?
I tried with a pull down resistor (10KOhm) but that didn't change anything.
I want to use my Javelin but i'm getting a bit frustrated now...
/Magnus
Comments
That way we can see where the javelin code differs from the basic code.
regards peter
import stamp.core.*;
public class ModemTest {
final static int radio_TX_PIN = CPU.pin1;
final static int radio_RX_PIN = CPU.pin2;
final static int SERIAL_TX_PIN = CPU.pin6;
final static int SERIAL_RX_PIN = CPU.pin7;
final static int GPS_RX_PIN = CPU.pin10;
static Uart GPSUart = new Uart( Uart.dirReceive, GPS_RX_PIN, Uart.dontInvert,
Uart.speed4800,Uart.stop1 );
/* static Uart txUart = new Uart( Uart.dirTransmit, SERIAL_TX_PIN,Uart.dontInvert,
Uart.speed4800,Uart.stop1 );
static Uart rxUart = new Uart( Uart.dirReceive, SERIAL_RX_PIN, Uart.dontInvert,
Uart.speed4800,Uart.stop1 );
*/
static Uart radioTXUart = new Uart( Uart.dirTransmit, radio_TX_PIN,Uart.invert,
Uart.speed4800,Uart.stop1 );
static Uart radioRXUart = new Uart( Uart.dirReceive, radio_RX_PIN,Uart.invert,
Uart.speed4800,Uart.stop1 );
static char tecken;
public static void main() {
radioTXUart.sendString("Hello");
while (true) {
if (radioRXUart.byteAvailable()) {
tecken=(char)radioRXUart.receiveByte();
System.out.println(tecken);
}
else
{
System.out.println("No data");
}
}
}
And some sample working BS2e code
' {$STAMP BS2e}
' {$PBASIC 2.5}
n48 CON 188
main:
SEROUT 1,n48, [noparse][[/noparse]"$LAD#",CR]
PAUSE 50
GOTO main
You say, when you replace the radiomodem with a TTL/RS232 converter (max232?)
then you see (at a PC using a com port?) the data. I have many boards that
have a max232 and then I always must use Uart.dontInvert to see the data
at a PC. You specified Uart.invert, which complies with the basic program, but not
with the fact that you see the data when using a TTL/232 converter.
Have you tried using Uart.dontInvert?
Another issue may be the power. The javelin draws considerably more current
than a BS2E. Can your powersupply deliver 80mA for the javelin plus the current
required for the radiomodem?
regards peter
* I use an external 5V source to drive both the modem and the Basic Stamp/Javelin. I actually tried to change 5V supply.
One clue that leads me to believe that is a level problem is that I sometimes get a lot of rubbish on the receive port. I have tried a 10KOhm pull down resistor, but that makes no difference.
Is the Javelin more sensitive on the pins?
/Magnus
I got the radiomodem manual from here:
http://www.lprs.co.uk/pdf_directory/11314mylprs1155820109erx00-02-series-data-sheet-(rev-2.4).pdf
It states that some baudrates may require 2 stopbits.
Have you tried using Uart.stop2?
Since the BS2e excecutes code from eeprom, 1 stopbit may be sufficient for BS2e.
The javelin executes code from parallel sram so maybe 2 stopbits are necessary.
Increasing the stopbits decreases the pace at which characters are sent.
For the receive uart I would still use 1 stopbit.
regards peter
No luck with 2 stop bits. The problem is that as soon as i start transmitting bytes, I start to receive Smile on the receiving pin.
The thing is that i have used the Javelin with this radio module about a year ago, but i can't find the source code i used back then.
I think this is a questin for the support att LPRS.
/Magnus
Maybe the pin currently used is damaged.
regards peter
I am looking for a longer range radio module. Something with 250mW output power. Any suggestions?
Regards
Magnus