PIC receive/transmit data

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

PIC receive/transmit data

Postby valo » Mon Oct 04, 2010 4:13 am

hi all..

im a super newbie in microcontroller..

consider i have a rs232 device to be connected to PIC. thats mean the data flow through UART. the also PIC connected to PC ,also via UART (serial port). i wanna use an LCD which its output based on the data that have been send back by PC. what are the steps?

another question, is it possible that if i store password in the PIC, the rs232 device will enabled only if i entered correct password?
valo
Fledgling
 
Posts: 1
Joined: Mon Oct 04, 2010 3:53 am

Re: PIC receive/transmit data

Postby ober » Mon Oct 04, 2010 9:52 am

valo WROTE:im a super newbie in microcontroller..

consider i have a rs232 device to be connected to PIC. thats mean the data flow through UART. the also PIC connected to PC ,also via UART (serial port). i wanna use an LCD which its output based on the data that have been send back by PC. what are the steps?

another question, is it possible that if i store password in the PIC, the rs232 device will enabled only if i entered correct password?


welcome to Cytron technical forum. Seem to me that you are not newbie from the questions you asked. Since you need to interface with 2 devices that require UART, to make your programming straight forward you need to choose microcontroller that come with 2 or more UART peripheral. Alternatively, you could refer to PR27 which uses software to create what we called virtual UART.

I would advice to start your project with simple target, try to display message on LCD and interface with your RS232 device, then to your computer.

Hope that helps.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: PIC receive/transmit data

Postby shahrul » Mon Oct 04, 2010 7:35 pm

Ober have answered the question.
valo WROTE:another question, is it possible that if i store password in the PIC, the rs232 device will enabled only if i entered correct password?

For this, yes you can store a password in the PIC EEPROM.
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: PIC receive/transmit data

Postby robosang » Tue Oct 05, 2010 9:57 am

Ya :shock: Start with the simple target, then slowly move to advance project..... save you a lot of time and money. Learn a lot too.

Yup, shahrul is right, you can actually save the data in EEPROM, PIC16F877A has 256 bytes of internal EEPROM which be written and read during program execution. Hi-Tech C Compiler should come with the library.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

PIC receive/transmit data

Postby nicholaswsw » Sat Oct 16, 2010 4:31 am

I have an question to ask as well say i'm using the 315Mhz and 433Mhz RF module and i want to connect it to PIC 16F877A. In this case i have to use 2 Tx and Rx Pins, are there any solutions to this issue? I was thinking of Multiplexing but then which IC to use, or there are other solutions?
nicholaswsw
Newbie
 
Posts: 12
Joined: Tue Sep 21, 2010 1:46 am

Re: PIC receive/transmit data

Postby ober » Sat Oct 16, 2010 9:52 am

nicholaswsw WROTE:I have an question to ask as well say i'm using the 315Mhz and 433Mhz RF module and i want to connect it to PIC 16F877A. In this case i have to use 2 Tx and Rx Pins, are there any solutions to this issue? I was thinking of Multiplexing but then which IC to use, or there are other solutions?


I don get you good? help me here.

Why you need 2 Tx and Rx pin?
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: PIC receive/transmit data

Postby nicholaswsw » Mon Oct 18, 2010 3:52 am

I'm using a Barcode Scanner with a RS-232C connection and i want to connect it to my PIC. And i'm using Zigbee to communicate with the another PIC so 1 Tx,Rx pins for the Rs232 and another Tx,Rx pin for the Zigbee Module
nicholaswsw
Newbie
 
Posts: 12
Joined: Tue Sep 21, 2010 1:46 am

Re: PIC receive/transmit data

Postby ober » Mon Oct 18, 2010 10:24 am

Now I get more confuse :lol: Previous post you are talking about RF module, now you talk about ZigBee....

Anyway from your description, you should need 2 Rx and 1 Tx. You can either find yourself a PIC that come with 2 UART engine or write a software UART as shown in one of Cytron DIY project, PR27
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: PIC receive/transmit data

Postby nicholaswsw » Thu Oct 21, 2010 7:18 pm

I'm a newbie here... I just want to ask 16F877a it's a 8 bit microcontroller, and Zigbee uses 16 bit addressing. Can I connect the two of them together?
nicholaswsw
Newbie
 
Posts: 12
Joined: Tue Sep 21, 2010 1:46 am

Re: PIC receive/transmit data

Postby yonghui » Thu Oct 21, 2010 7:40 pm

hi,

the 8bit microcontroller can be used to control the zigbee. no problem.
thanks&regards,
yh
yonghui
Professional
 
Posts: 732
Joined: Mon Sep 28, 2009 3:27 pm

Next

Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 1 guest

cron