UART problem

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

UART problem

Postby Farid89ism » Tue Feb 07, 2012 2:30 pm

Hi..im doing my final year project about RFID system and servo motor using PIC16F877A. The problem is both are using UART which involves Rx and Tx. However, there are only one UART in PIC. What should i do to combine all the system?
Farid89ism
Newbie
 
Posts: 15
Joined: Mon Nov 14, 2011 5:49 pm

Re: UART problem

Postby shahrul » Tue Feb 07, 2012 8:15 pm

combine RFID Reader and Servo Controller, you have 3 ways
1. RFID Reader just use RX and Servo Controller just use TX.
2. Use multiplexer/demultiplexer IC to multiple the TX and RX but you can't use both at the same time.
3. Do UART Software, so that you can use TX and RX on any pin. But, program TX is more easily than program RX. I have try develop program RX for years.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: UART problem

Postby Farid89ism » Wed Feb 08, 2012 7:20 am

Mr Shahrul..if im doing 1st step, then the ground and voltage will combined together? I have read manual in cytron, servo controller(SC08A) must put at least in Rx not Tx. How about that?
Farid89ism
Newbie
 
Posts: 15
Joined: Mon Nov 14, 2011 5:49 pm

Re: UART problem

Postby shahrul » Wed Feb 08, 2012 9:00 am

Farid89ism WROTE:Mr Shahrul..if im doing 1st step, then the ground and voltage will combined together? I have read manual in cytron, servo controller(SC08A) must put at least in Rx not Tx. How about that?

The RX of the Servo Controller but TX of PIC. PIC send the data to the Servo Controller. Can view example program servo controller.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: UART problem

Postby robosang » Wed Feb 08, 2012 9:57 am

I will use the 1st interface too :mrgreen: RFID does not require TX from PIC and Servo controller does not require transmit to RX of PIC, at least most of the application does not require feedback to PIC. So you don need another pair of UART pin.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: UART programing problem

Postby ismawanieh » Sun Feb 12, 2012 12:59 pm

i need both of this file #include "LibraryHD44780.h" & #include "LibraryUART.h" for my gsm alarm system program,, i need to include both of this program for my header / source file in my program in MP lab, can you email to me both of this program ASAP?
ismawanieh
Greenhorn
 
Posts: 2
Joined: Sat Feb 11, 2012 3:15 pm

Re: UART programing problem

Postby shahrul » Sun Feb 12, 2012 1:50 pm

ismawanieh WROTE:i need both of this file #include "LibraryHD44780.h" & #include "LibraryUART.h" for my gsm alarm system program,, i need to include both of this program for my header / source file in my program in MP lab, can you email to me both of this program ASAP?

All header file here. http://shahrulnizam.com/header/
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: UART problem

Postby ismawanieh » Sat Feb 18, 2012 4:08 pm

i already get the header file for "LibraryUART" and how about the source code of the file? and how to include the header file into my program because if i copy into notepad, the format is as note pad, not h file, :?:
ismawanieh
Greenhorn
 
Posts: 2
Joined: Sat Feb 11, 2012 3:15 pm

Re: UART problem

Postby shahrul » Sat Feb 18, 2012 10:08 pm

ismawanieh WROTE:i already get the header file for "LibraryUART" and how about the source code of the file? and how to include the header file into my program because if i copy into notepad, the format is as note pad, not h file, :?:

Save the file and type <filename>.h
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 2 guests

cron