PDA

View Full Version : I want to connect PIC16F877 to PIC16F84 by using serial communication



mohamedattia35
- 15th January 2007, 20:47
Hi, every one
I have a problem when I try to connect two PIC u controllers (PIC16F877) and (PIC16F84) by using serial communication.

I test each PIC separately and they work well with virtual PC terminal.

The serial communication settings are : Baud rate = 9600, 8 bit without parity.

Each u Controller separately send and receive data correctly to and from the virtual PC terminal.

I use these commands for send and receive data :

For send data : (PIC16F877)
---------------
declare Xtal = 20
SERout portB.2, 16468 , ["00" , 13]
SERout portB.2, 16468 , [DEC 11 , 13]
SERout portB.2, 16468 , [DEC 10 , 13]


For receive data : (PIC16F84
-----------------
declare Xtal = 4
dim serdata as byte
SERIN portB.2 , 16468 , [DEC serdata]

Can any one have an idea about this situation.


---------------------------------------------------
Thank you ...
Mohamed Attia
[email protected]
[email protected]

skimask
- 15th January 2007, 22:38
Hi, every one
I have a problem when I try to connect two PIC u controllers (PIC16F877) and (PIC16F84) by using serial communication.

I test each PIC separately and they work well with virtual PC terminal.

The serial communication settings are : Baud rate = 9600, 8 bit without parity.

Each u Controller separately send and receive data correctly to and from the virtual PC terminal.

I use these commands for send and receive data :

For send data : (PIC16F877)
---------------
declare Xtal = 20
SERout portB.2, 16468 , ["00" , 13]
SERout portB.2, 16468 , [DEC 11 , 13]
SERout portB.2, 16468 , [DEC 10 , 13]


For receive data : (PIC16F84
-----------------
declare Xtal = 4
dim serdata as byte
SERIN portB.2 , 16468 , [DEC serdata]

Can any one have an idea about this situation.


---------------------------------------------------
Thank you ...
Mohamed Attia
[email protected]
[email protected]



Doesn't look like PBP to me...or am I wrong again...
At any rate, have you checked your PBP manual? There's an interesting note on page 202 that may help your situation.

mohamedattia35
- 16th January 2007, 04:10
Doesn't look like PBP to me...or am I wrong again...
At any rate, have you checked your PBP manual? There's an interesting note on page 202 that may help your situation.
Hi, skimask

yes you are right, it is Proton Development Suite, but is too similar to the PicBasic pro, and also more advanced for editing and debbuging.

I don't have the manual you had talk about.

So please send to me this page (202)

and thank you again ...

skimask
- 16th January 2007, 05:38
Hi, skimask

yes you are right, it is Proton Development Suite, but is too similar to the PicBasic pro, and also more advanced for editing and debbuging.

I don't have the manual you had talk about.

So please send to me this page (202)

and thank you again ...

Well, if you had bought PicBasicPro, you'd have the manual...

Maybe you can find that page at the same downloadZ site you found Proton at.

'nuff said...

I rest my case...

In fact, I'll do one better...

For the low, low, price of $249.99USD, I'll send you the full manual, the complete PicBasicPro Compiler system, and practically a lifetime of technical support, hints, ideas, etc.

mohamedattia35
- 16th January 2007, 06:19
Well, if you had bought PicBasicPro, you'd have the manual...

Maybe you can find that page at the same downloadZ site you found Proton at.

'nuff said...

I rest my case...

In fact, I'll do one better...

For the low, low, price of $249.99USD, I'll send you the full manual, the complete PicBasicPro Compiler system, and practically a lifetime of technical support, hints, ideas, etc.

Hi,
I found the manual and also I go to page 202, it contains a table about baud rate setting and I try all the values that match with my baud rate (9600) and also it doesn't work.

But I put in my code a step that help me to know why it does not work and the result is it was a time out condition in the communication and the time interval is 5 sec and then the case occurred (time_out).

And I think the signal is still TTL so I don't need for level converter (I think so).


Do you still have other solutions.

Thank you very much for you good co operation.

skimask
- 16th January 2007, 06:34
Hi,
I found the manual and also I go to page 202, it contains a table about baud rate setting and I try all the values that match with my baud rate (9600) and also it doesn't work.

But I put in my code a step that help me to know why it does not work and the result is it was a time out condition in the communication and the time interval is 5 sec and then the case occurred (time_out).

And I think the signal is still TTL so I don't need for level converter (I think so).


Do you still have other solutions.

Thank you very much for you good co operation.



You don't get it do you?

You are using Proton, we are talking PicBasicPro.
We don't know Proton (well, some of us do, but that's not the point).
Go to Proton's forums and ask there.

And yes, I've got other solutions...
For the low, low, price of $249.99USD, I'll send you the full manual, the complete PicBasicPro Compiler system, and practically a lifetime of technical support, hints, ideas, etc.

mohamedattia35
- 16th January 2007, 07:02
You don't get it do you?

You are using Proton, we are talking PicBasicPro.
We don't know Proton (well, some of us do, but that's not the point).
Go to Proton's forums and ask there.

And yes, I've got other solutions...
For the low, low, price of $249.99USD, I'll send you the full manual, the complete PicBasic Pro Compiler system, and practically a lifetime of technical support, hints, ideas, etc.
Hi, my dear friend,

Really the type of the software is not the problem that I am asking about, what ever the software that you are using, it will not be a problem with me.

If you want to go in the situation and talk PicBasic Pro, there is not a problem, go ahead and I will understand your code in PicBasic Pro, because it is very close to mine.

So assume that I using PicBasic Pro and go ahead

Really, Thank you very much for your co operation.

skimask
- 16th January 2007, 15:23
A: Hi, my dear friend,

B: Really the type of the software is not the problem that I am asking about, what ever the software that you are using, it will not be a problem with me.

C: If you want to go in the situation and talk PicBasic Pro, there is not a problem, go ahead and I will understand your code in PicBasic Pro, because it is very close to mine.

So assume that I using PicBasic Pro and go ahead

Really, Thank you very much for your co operation.

A: I'm not your friend...I could be...but I'm not.
B: Well, you may be familiar with PBP, but I'm not familiar with Proton, and I would guess that most here aren't either. Wouldn't it just make a lot more sense to talk over there?
C: I don't have any code for you and besides, I'm thinking most likely that page 202 of the PBP manual should've answered your your question about why your code doesn't work, whether it be in PBP or Proton.

mohamedattia35
- 17th January 2007, 20:18
A: I'm not your friend...I could be...but I'm not.
B: Well, you may be familiar with PBP, but I'm not familiar with Proton, and I would guess that most here aren't either. Wouldn't it just make a lot more sense to talk over there?
C: I don't have any code for you and besides, I'm thinking most likely that page 202 of the PBP manual should've answered your your question about why your code doesn't work, whether it be in PBP or Proton.

Hi, My Dear that could be my friend !!!

Thank you very much for your good co operation.
I found the solution and the project is now working well.

and finally I want you to know that I welcome you at any time if you need any assistance from me and also I want you to know that I am registered in many forums about electronics and also all the users there are my friends even if I don't know them and they don't know me, because when you agree to help me, I take you as my friend and so I call you "My Friend", that is in my opinion, what about your's ?

and finally thank you any way for assisting me.

And I hope I can help you, if you want.

----------------------------------------
Mohamed Attia
[email protected]
[email protected]