Re: CuriousOne
Yes, OSC has been defined on both chips, however they are different from each other. 18F4620 is using OSC 20 (external), 10F202 is using OSC 4 (internal). Could this be the reason?
Re: mackrackit
I tried with loops, interrupts but nothing has worked so far. I think the main problem is synchronization. Let me try to explain:
In an ideal case it should be (skipping definitions):
18F4620
--------
PAUSE 1000
SEROUT PORTA.1,N9600,[GG]
SERIN PORTA.0,N9600,[TT]
lcdout $FE,214,"SERIN:[",#tt,"]"
10F202
-------
SERIN GPIO.1,N9600,[RR]
SEROUT GPIO.0,N9600,[RR]
time analysis:
TIME | 18F4620 ----------| 10F202
---------------------------------------
0 ---| PAUSE 1000 ------|SERIN (waiting)
1 ---| SEROUT ----------| message received
2 ---| SERIN (waiting) ---| SEROUT
3 ---| message received -|
4 ---| LCDOUT ----------|
I think 2-pic communications usually go in 1-way. Pic_1 receives data from Pic_2 and lights a led or something. But in this case both pics sending and receiving messages in a very short time should be causing the problem.




Bookmarks