Hi, i tried running the serial sample codes under serial folder, but i couldn’t see anything from the hyperterminal side… the connections set are as in the instruction, any idea what went wrong?
Your RX and TX lines are connected wrong way around?
You did not use a RS232 driver chip like the MAX232 etc?
Cannot really say what went wrong from the sparse information you provided
thanks for the reply kobuseng… hmm i connected the rs232 td to rabbits rxB and rd of rs232 to rabbits txB i think thats alright… bascially what i did was i took a serial cable plug it into comport1 and jumper the wire of the pin 2,3 and 5 out respectively… was that a wrong move?
@Sam
Sam you need to put a RS232 driver between the rabbit and the PC. The problem is the Rabbit can only generate voltages of 0V and 3.3V, and RS232 interface levels specify minimum voltage levels of ~-6V and +6V. You can get one from Maxim. Look for the MAX232 or MAX233 should suit your needs.
@Pendragon
Pendragon could you post your very basic code. Perhaps you did not initialize the correct serial port.
Sam
I’m trying the exact same. Have RCM5700 with Serial I/O board and used the 5700 specific code to SIMPLE5WIRE.c test the JP3 port and things worked well. But when I use the generic program PUTS.c connected to HyperTerminal using 5-5 2-3 3-2 etc I get an error “0” code! I would be interested in hearing how you get on with this. If you want to speed process you can email direct at abjarvis@comcast.net
My problem was unfamiliarity with DynC - It is very pedantic. This worked fine;
#define DINBUFSIZE 15
#define DOUTBUFSIZE 15
main()
{
static const char s[] = "Hello World
";
serDopen(19200);
serDputs(s);
while (serDwrFree() != DOUTBUFSIZE);
while (BitRdPortI(SDSR, 3) || BitRdPortI(SDSR, 2));
serDclose();
}
I find the amount of DynC literature restrictive (are then any real Books out there?) and have to troll around the forums for pickings. The U/M and R/M are very brief with few real program examples merely snippets. Next step is to read an ASCII string. Then on to Tx to a server
thanks kobuseng i found a 16pin-max232 form the datasheet i know pin 15 and 16 are vcc and gnd how do i connect the td rd? do i connect it to the input and ouput pins or the TTL and CMOS pins?
According to the maxim companies nomenclature you should connect the Rabbit serial port as follows :
Rabbit TX ----- MAX T1IN (pin11?)
Rabbit RX ----- MAX R1OUT (pin12?)
PC TX (D9 connector pin 3) ---- MAX R1IN(pin13?)
PC RX (D9 connector pin 2) ---- MAX T1OUT(pin14?)
But the Maxim datasheet is quite clear. You will find everything you need in there.
Remember to connect the capacitors for the charge pump of the MAX232.
Yes you might be right about not enough literature.
Something to look out for is if you are going to use the cofunction serial read function cof_serXread. If it doesn’t receive a first byte it will not yield or something like that. You can look at this post for more information.