Hi!
I am working on the Flowcode V3 to connect two PIC18F4550 Microcontrollers via a wireless link. I have two Zigbee modules, the Coordinator and the End node. I have tried the Zigbee Factory Test from the Matrix Multimedia Learning Centre and the test was successfully passed on the PIC16F877A, but when I tried to change the PIC to PIC18F4550, the test was always failed. Because RC3 pin is absent on the PIC18F4550 I have changed the Component connections. The only issue that I can think of is the configuration of the PIC18F4550 device. Can you please help me with that?
Things I have done to change the PIC Microcontroller:
1. Tested Zigbee plugged into PORTC of PIC16F877A. Test was successful.
2. Took the Zigbee out of PORTC, and connected everything with the wires. Test was successful.
3. Changed RTS, CTS and SLEEP Component connections in the Flowcode and the wires to the PIC. Test was still successfull.
4. Changed the Target Chip t PIC18F4550 in the Flowcode and the PIC on the Development board. Test was failed.
5. Tried to change the configuration of PIC18F4550. Test was failed.
The attached FCF file is the changed Factory Test code.
Thank you!
PIC18F4550 + Zigbee problem
- 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: PIC18F4550 + Zigbee problem
Hello,
Please try these configuration settings and the device should work correctly using the 19.6608MHz crystal. The settings not shown I think you had correct anyway.
You should also be aware that the USB data pins RC4 and RC5 cannot be used as standard digital outputs. Though they will work fine as inputs. Pins RC0, RC1 and RC2 should be ok for the additional connections required by the Zigbee.
Please try these configuration settings and the device should work correctly using the 19.6608MHz crystal. The settings not shown I think you had correct anyway.
You should also be aware that the USB data pins RC4 and RC5 cannot be used as standard digital outputs. Though they will work fine as inputs. Pins RC0, RC1 and RC2 should be ok for the additional connections required by the Zigbee.
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: PIC18F4550 + Zigbee problem
Yes! The test is successful! Thank you! So the configuration of the PIC and the Crystal ( I have used 20Mhz, but 19.6 was needed ) were the issues. After testing both, the Coordinator and the end node Zigbee Modules with the test file, I have followed instructions in ZigBee Teachers Course Notes to make the code for Coordinator and End Node.
It seemed that two Zigbees are connected to each other, as I remember the last verbose message on both LCDs was AFTROK, but unfortunately, after they connected to each other they both went to the next level where they have to communicate by sending RS232 Signals, but nothing happend. I have simplified the code for Coordinator to send '1' and for End Node to receive it and display when '1' is received, but nothing worked either.
I have attached the code to this post. In the next post I will add screenshots of Zigbee configuration.
Can you please tell me what have I done wrong, and what can I do to make them communicate?
It seemed that two Zigbees are connected to each other, as I remember the last verbose message on both LCDs was AFTROK, but unfortunately, after they connected to each other they both went to the next level where they have to communicate by sending RS232 Signals, but nothing happend. I have simplified the code for Coordinator to send '1' and for End Node to receive it and display when '1' is received, but nothing worked either.
I have attached the code to this post. In the next post I will add screenshots of Zigbee configuration.
Can you please tell me what have I done wrong, and what can I do to make them communicate?
- Attachments
-
- Router_new.fcf
- Simple End Node code
- (13.5 KiB) Downloaded 328 times
-
- Coord_new.fcf
- Simple Coordinator code
- (7.5 KiB) Downloaded 304 times
Last edited by isceglovs on Thu Apr 15, 2010 5:39 pm, edited 1 time in total.
Re: PIC18F4550 + Zigbee problem
The following are the screenshots of Zigbee configuration for both, Coordinator and End node.
- Attachments
-
- End node Zigbee config(second try)
- Router_new2.jpg (55.25 KiB) Viewed 5310 times
-
- End node Zigbee config(first try)
- Router_new.jpg (55.19 KiB) Viewed 5310 times
-
- Coordinator Zigbee config
- Coord_new.jpg (55.17 KiB) Viewed 5310 times
- 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: PIC18F4550 + Zigbee problem
Hello,
You seem to have two nodes named Device. I dont thin kthis is allowed to have multiple devices wth the same name. Are you using the connect to macros to set up the recipient before you try and send data? You may also have to call the leave AT command mode to ensure that you are back in data mode before you try sending anything.
You seem to have two nodes named Device. I dont thin kthis is allowed to have multiple devices wth the same name. Are you using the connect to macros to set up the recipient before you try and send data? You may also have to call the leave AT command mode to ensure that you are back in data mode before you try sending anything.
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