Interface between Fastrack Supreme and PIC

HI, ALL

I have a problem when i try to interface Fastrack with PIC using UART 1. I simply send a data block from Fastrack to PIC. I use 2 line TX and RX of Fastrack to connect to RX and TX of PIC but PIC can’t receive any thing. Can I give me an advice about this problem? I configure UART1 at 9600.

My code:

void AppInitSerial(void)
{
static u8 CommandSent = 0;
// TO DO : Add your initialization code here
switch(CommandSent)
{
case 0:
// Open the NMEA through,Physical Port,Open Physical Port, UART1
adl_atCmdCreate(“AT+WMFM=0,1,1”, ADL_AT_PORT_TYPE(ADL_PORT_NONE, FALSE), (adl_atRspHandler_t)Init_ResponseHandler, “", NULL);
TRACE(( 1 , “AT+WMFM=0,1,1”));
CommandSent++;
break;
case 1:
/
***** Initialize the serial port for GPS chipset as an FCM port ***/
//Set the baud rate
wm_sprintf(ATCommand, “AT+IPR=%d”, OSCOMM_BAUDRATE);
adl_atCmdCreate(ATCommand, ADL_AT_PORT_TYPE(ADL_PORT_UART1, FALSE), (adl_atRspHandler_t)Init_ResponseHandler, "
", NULL);
TRACE(( 1 , ATCommand));
CommandSent++;
break;
case 2:
//Set to 8 data bits, odd parity, 1 stop bit
//TRACE(( 1 , “AT+ICF=2,0”));
//adl_atCmdCreate(“AT+ICF=2,0”, ADL_AT_PORT_TYPE(ADL_PORT_UART1, FALSE), (adl_atRspHandler_t)Init_ResponseHandler, "
", NULL);
adl_atCmdCreate(“AT+ICF=3,4”, ADL_AT_PORT_TYPE(ADL_PORT_UART1, FALSE), (adl_atRspHandler_t)Init_ResponseHandler, "
”, NULL);
TRACE(( 1 , “AT+ICF=2,0”));
CommandSent++;
break;

case 3:
   //No flow control
    adl_atCmdCreate("AT+IFC=0,0", ADL_AT_PORT_TYPE(ADL_PORT_UART1, FALSE), (adl_atRspHandler_t)Init_ResponseHandler, "*", NULL);
    TRACE(( 1 , "AT+IFC=0,0"));
	CommandSent++;
	break;

case 4:
	SendDataToUart1();
	break;
}

}

Thanks a lot!

Hiya,

Some things to check:

  • Check that you’ve got the TX/RX lines around the right way. The Fastrack is a DCE (Data Communications Equipment) device, so TX on the Fastrack is an Input and RX on the Fastrack is an Output. Try connecting TX to TX, RX to RX and see how you go.
  • Don’t forget that the Fastrack serial interface is at RS232 voltage levels, NOT TTL levels required by the PIC. You WILL need to put a level translator (i.e. MAX232 or similar) between the PIC and the Fastrack. Don’t forget to check that input goes to input (etc) through the MAX232…
  • Finally, connect the Fastrack up to the PC and run Hyperterm (or similar serial terminal emulator - I find Realterm is better than Hyperterm for this low level debugging), and test your code. Is your code outputting what you expect when viewed in the terminal emulator?

Ciao, Dave

One more thing: remember that, by default, the Fastrack requires the hardware handshaking lines - as stated in the User Guide.

See: viewtopic.php?f=53&t=3081&p=11355&hilit=RTS+CTS#p11377

Excellent advice (one for the FAQ :wink: ); but be sure to do it with the same 3-wire connection…

Hi all, my project is near to the end. but there is still some things that occur. I have the similiar problem with phamduong. my Fastrack couldn’t send any data to my LED display. what i have checked so far is that the cable connectivity is right. (from what i read from Dave’s post that the connection must be TX to TX and RX to RX). and the second is that the LED display is already communicating in RS232 standard. because i could communicate between my PC’s serial port with the LEDdisplay’s serial port. then what could have been gone wrong? thank you for your advice in advance.

Best regards,
Hade

oh one more thing… what is the voltage level of rs232 output from the Fastrack supreme? from what i read if i am not mistake it is around plus minus 3 V?

What did you read?

If you want to know what RS232 voltage levels are, then you need to read the RS232 specification!

Note that the official title is now “TIA-232-F” - see: standardsdocuments.tiaonline.org/tia-232-f.htm

I think you are probably mistaken.

That assumes that your device is configured as a DTE.

viewtopic.php?f=30&t=3450&p=13023&hilit=dte+dce#p13023

Also, did you note the bit about flow control signals…?

hi awneil,

yes i already set the flow control signal off. using at+ifc command. i know now that the rs232 is working on ± 3 - 15V. Does the output txd from Fastrack has the same voltage level?

Yes, the Fastrack’s output is RS232 compliant.

Consider that Wavecom documentation usually indicates RS232 signal from the PC point of view: Tx is the wire where the Fastrack recieve the data.

Yes, that’s one way to look at it.

Another way is to remember that Wavecom products are DCEs - ie, “modems” - and TX is always an input to a DCE

See: viewtopic.php?f=53&t=3081&p=11355&hilit=RTS+CTS#p11355
And: viewtopic.php?f=37&t=2919&p=10657&hilit=input+dce#p10657

A further way to look at it is that “Tx” is the name of the signal - not the name of a pin;
then, clearly, the Tx signal must come out of the DTE and go in to the DCE

In other words, “Tx” means “the data to be transmitted over the link”

See: viewtopic.php?f=5&t=2997&p=11015&hilit=input+dce#p11015

Nobody should do anything RS232-related without at least having something like this:


eg, uk.rs-online.com/web/search/sear … &R=6246347

That will allow you to see which lines are being driven - from which, among other things, you can deduce which are inputs and which are outputs.

If you like that sort of thing, and don’t want to buy one, it’s easy to make your own with just a few LEDs and resistors…