CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Displaying data from one i/o port

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
lopex
Guest







Displaying data from one i/o port
PostPosted: Mon Aug 20, 2007 12:37 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Aug 20, 2007 12:00 pm     Reply with quote

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








PostPosted: Tue Aug 21, 2007 2:18 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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