Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC18F4550 with Parallax USB datalogger via UART

Status
Not open for further replies.

ahmedkhalaf

Newbie level 5
Joined
Nov 1, 2008
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,343
I'm working on a Flash memory based datalogger using

Microchip PIC18F4550

and **broken link removed** which is based on **broken link removed**

I'm developing my prototype on MikroC so everything can be a piece of cake :(
My problem is interfacing the uC with the datalogger, and specifically the RTS/CTS hardware handshaking.

After around 12 hours of failing trials, I tried to tie datalogger's CTS to Gnd and datalogger's RTS to Vcc, but I get no data from it.

and the program is trapped on the first trial to receive responce from the datalogger

while(1)
{
if(UART1_Data_Ready())
{
UART1_Read_Text(RcvBuffer,"\r",Attempts);
break;
}
}


Can anyone provide clear info about that RTS/CTS hardware handshaking ?
Is it async ? or sync ?
Is it active low or active high ?
 

I went about it slightly differently then coding the handshake, but perhaps this will help.

I connected the RTS pin to the CTS pin, making the device tell itself that its good to go.
I also connected the CTS pin to an analog input on an Arduino micro controller.

In the code while (analogread(A0) == 0)
{ delay (1); } //delays 1 ms.

Bridging the two pins initiates the data logger and CTS reads high when the data logger is ready for more data (~1.5/1023V). The CTS pin is also what controls the LED on the parallax data logger. After the handshake, put the drive in and it will flash red for a second and then go solid. When writing to it the light will also flash red when its clear to send and should turn off when the USB drive is removed.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top