|
|
View previous topic :: View next topic |
Author |
Message |
lopex Guest
|
Displaying data from one i/o port |
Posted: Mon Aug 20, 2007 12:37 am |
|
|
Good afternoon to all.
My question is based on data processing from one external device.
I have connected my device to my demo board on the way that one wire is used as I/O wire (connected to 16F PIN ) and all data is passed thru this wire.
My goal is to set this PIN as input and then read all data from this I/O.
The amount of data passed thru this I/O is big and continues so the only way for me is to display this data on my computer using some terminal program.
How to pass this I/O data per serial port, to some terminal program ?
LpX |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Aug 20, 2007 12:00 pm |
|
|
Create the code for a UART with the #use rs232() statement, as shown
below. Connect your PIC to the PC with a MAX232A chip and a cable.
Use the following program to test it. The program will display
"Hello World" in the terminal window on the PC.
Code: |
#include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
//================================
void main()
{
printf("Hello World\n\r");
while(1);
} |
|
|
|
Guest
|
|
Posted: Tue Aug 21, 2007 2:18 am |
|
|
Thank you for reply.
Quote: | Connect your PIC to the PC with a MAX232A chip and a cable |
Can i connect serial cable to PICkit 1 flash starter kit ( dont ask why :-)), or do you suggest some other way for displaying data ?
Instead 16F i will use the 12F675.
Anyway, back to the problem.
The I/O wire is connected to our testing external device which is using the standard mobile phones protocols. My goal is to monitor all data that is passed thru few I/O ports but for start i will use just one.
LpX |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|