communication between 2 or more pic
Moderator: Benj
communication between 2 or more pic
HI
like I said I want to communicate between at least 2 pic 16f877a how can I do that.
I was thinking about rs232 ??
One pic will be like an control panel whit input botuns, lcd, lots of LED....
the other will be for outputs and inputs like operating valves, motors,......
like I said I want to communicate between at least 2 pic 16f877a how can I do that.
I was thinking about rs232 ??
One pic will be like an control panel whit input botuns, lcd, lots of LED....
the other will be for outputs and inputs like operating valves, motors,......
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: communication between 2 or more pic
Hello,
RS232 or the TTL 5V equivalent eg not using MAX232 voltage level converter chips is probably the easiest way of establishing communications.
You should be able to wait for an incoming byte and then switch depending on that byte value to control the operation of the device.
Eg
Byte = 1, Take the next bytes and output them to a LCD, If the byte received is 255 then go back to waiting for a valid byte.....
RS232 or the TTL 5V equivalent eg not using MAX232 voltage level converter chips is probably the easiest way of establishing communications.
You should be able to wait for an incoming byte and then switch depending on that byte value to control the operation of the device.
Eg
Byte = 1, Take the next bytes and output them to a LCD, If the byte received is 255 then go back to waiting for a valid byte.....
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: communication between 2 or more pic
I have figured something out aboute rs232 because i realy couldnt make real sents of your post..sory
now I have a new problem my flowcode says that this version of flowcode can compile code or the folowing components only:
LED
LEDarray
led7seg
led7seg4
LCDDisplay
SWITCH
SWITCHbank
ADC
kaypad
PWM
formulaFlowcode
MIAC
what is wrong I dont get any activiti on the pins when I try the chip.
now I have a new problem my flowcode says that this version of flowcode can compile code or the folowing components only:
LED
LEDarray
led7seg
led7seg4
LCDDisplay
SWITCH
SWITCHbank
ADC
kaypad
PWM
formulaFlowcode
MIAC
what is wrong I dont get any activiti on the pins when I try the chip.
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: communication between 2 or more pic
No activity on the pins is usually down to the configuration settings of the chip (Select 'Chip' 'Configure' then switch to expert screen. Make sure watchdog timer and LVP are disabled. Take a look here:
http://www.matrixmultimedia.com/mmforum ... =26&t=6936
If you want to post your flowchart, along with the hex code it has compiled, then I can have a look for you and see whats causing the issue.
http://www.matrixmultimedia.com/mmforum ... =26&t=6936
If you want to post your flowchart, along with the hex code it has compiled, then I can have a look for you and see whats causing the issue.
Martin
Re: communication between 2 or more pic
the problem is whit flowcode I cant compile anithing but the listed things Ihave tried all not listed comonents and the same error aperes.
the flowcode and hex are here
the flowcode and hex are here
- Attachments
-
- error
- neimenovana.JPG (16.91 KiB) Viewed 6262 times
-
- rs232 com.hex
- (3.59 KiB) Downloaded 270 times
-
- rs232 com.fcf
- (8 KiB) Downloaded 290 times
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: communication between 2 or more pic
Your flowchart compiled OK on my PC with no errors. Are you using an internal or external osc, and at what speed?
I would also be helpful if you can post the .msg file so the all the error information can be read.
Only time you will get limitations on components not able to be used (e.g RS232) is if you have a student/home version.
Edit: just saw your picture.
If you do help/about what is the version and licence type you have got?
Could it be you have not fully registered with pro serial?
I would also be helpful if you can post the .msg file so the all the error information can be read.
Only time you will get limitations on components not able to be used (e.g RS232) is if you have a student/home version.
Edit: just saw your picture.
If you do help/about what is the version and licence type you have got?
Could it be you have not fully registered with pro serial?
Martin
Re: communication between 2 or more pic
oh no.
i have a student version of flowcode
(
i am using a 16f877a pic whit an 4mhz osc. (HS in setings )
i have a student version of flowcode
i am using a 16f877a pic whit an 4mhz osc. (HS in setings )
- Attachments
-
- rs232 com.c
- (15.58 KiB) Downloaded 284 times
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: communication between 2 or more pic
You must have the Demo or Student version as I have just downloaded and installed the demo version and I get exactly the the same message now.
In order to use RS232 you must have a licence for the professional version. If you already have the student version, then if you upgrade to to professional, then there is a large discount.
In order to use RS232 you must have a licence for the professional version. If you already have the student version, then if you upgrade to to professional, then there is a large discount.
Martin
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: communication between 2 or more pic
We posted at the same time.
The pro version is well worth buying, due to the extra components available.
Until then, I'm afraid you will not be able to continue with your flowcode that contains RS232, due to licence limitations, Sorry about that.
The pro version is well worth buying, due to the extra components available.
Until then, I'm afraid you will not be able to continue with your flowcode that contains RS232, due to licence limitations, Sorry about that.
Martin
Re: communication between 2 or more pic
oh well then happy christmas
tnx for now I will continue as soon as I have a pro licenc
tnx for now I will continue as soon as I have a pro licenc
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: communication between 2 or more pic
Thanks, and Happy Christmas to you, and to everyone else who reads this.
Martin