• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Connecting a PIC

Status
Not open for further replies.

joellee

New Member
So far I've got a code loaded into the PIC, and would like to test it. I would just like to clarify if my pin connections are alright



or click here if the picture doesn't show up

The code, if it is of any use to check if my connections are right..It is quite straight forward
*detects the string "GPGGA" in a serial data @ 4800bps, once it detects, it takes in the next 24 bytes and retransmit it at 2400bps - and does this forever*

Device = 16F877
Xtal = 20

Dim Position[24] As Byte
TRISA = %00000001
Declare Rsin_Pin PORTA.0
Declare Serial_Baud 4800

Loop:
RSIn Wait ("GPGGA"), Str Position
SerOut PORTA.1, 16780, [Str Position]
GoTo Loop

*I've posted another topic about the code a few days before, thanks guys for helping out*
 
Last edited:

be80be

Well-Known Member
You need to hook up all the Vdd pins and Vss pins you also want a resistor to pullup mclr smething like 10k not just a wire to Vdd
 

Diver300

Well-Known Member
Most Helpful Member
It seems odd that you are not using the serial port. You have to run the receive and transmit at the same rate at any one time, but you could always buffer the data at 4800 and then change the data rate, and transmit at 2400

I guess that you are using a library function which bit-bashes serial signals on any port, but you will somewhere have to tell it to transmit at 2400.
 

joellee

New Member
It seems odd that you are not using the serial port. You have to run the receive and transmit at the same rate at any one time, but you could always buffer the data at 4800 and then change the data rate, and transmit at 2400

I guess that you are using a library function which bit-bashes serial signals on any port, but you will somewhere have to tell it to transmit at 2400.
thanks for the note!

the 16780 thing in the code is supposed to translate into 2400 bps.
 

be80be

Well-Known Member
Your using Pic basic to that's why the ra0 and ra1 are being used retransmit
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top