PIC terminal - serial communication

Status
Not open for further replies.

charlespavlov

Newbie level 5
Joined
May 7, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,370
PIC terminal

Hello again
I'm thinking of making a PIC terminal.
It'd take commands from a PC via serial, display them on serial, process data(ex: from sensors) and then perhaps send them back to the PC.
What's new to me is the command interpreter part of the software.
Commands would be structured something like this
$PPCCAABB
$-adress the uC
PP-command prefix, ex CM for command, SU (for set-up) to set options, MD (mode select)
CC-command code
AA-1st param (optional)
BB-second param (optional)

Does anyone know of a documented attempt of doing this? I'd REALLY like some inpiration
 

Re: PIC terminal

Hi,

Well you can create your own terminal very easily, you first need to set up a rs232 serial link between a pic and Hyperterminal on your PC.
(if you have a Pickit2 you can even use its Eusart Tool to simulate the PC without all the extra rs232 hardware)

Once you have established basic communication then its down to you what code you send from the PC and how you receive and interpret them on the PIC.

Just search for the many Pic RS232 turotials and start from there.

You do not say what Pic language you want to use.
 

Re: PIC terminal

A good tutorial i believe is
plus your pics datasheet and you 've got everything you need.
 
Re: PIC terminal

georgz said:
A good tutorial i believe is
plus your pics datasheet and you 've got everything you need.

Thank you!
That looks like one of the most complete tutorials on RS232 I've seen so far...


Some type of C, of course. Probably Mikroelektronika's MikroC
 

Re: PIC terminal

This looks similar to parsing the data from a NMEA183 sentence (i.e., $GPWPL,4917.16,N,12310.64,W,003*65) coming out of a GPS unit. I've done this in various flavors of BASIC before, but not in C. In PicBasic Pro (and even with the old Basic Stamp 2) it was dead easy.

Google "gps parse nmea" and I think you'll find something to start with, then go from there.

Good luck with your project.
 
Not really GPS, but the similarity between the comand formatting is striking.

So it's basically just "switch {case}"-es?... Was thinking of something more fancy

Thanks for the hint! That's definitely useful!

If it happens that this project comes to fruition, or at least close to it, I'll post pictures
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…