View previous topic :: View next topic |
Author |
Message |
J_GROUP
Joined: 25 Aug 2015 Posts: 18
|
PIC SPI interface with Zigbee MRF24J40MA |
Posted: Thu Aug 27, 2015 10:27 am |
|
|
Dear Friends,
I trying to interface PIC 18F25k20 with zigbee module MRF24J40MA to tranfer an Ascii string but still no result.
Can you help me sample CCS code
Thank you |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19498
|
|
Posted: Thu Aug 27, 2015 11:15 am |
|
|
Look in the code library. Fully translated driver sitting there. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Thu Aug 27, 2015 2:47 pm |
|
|
Sure hope you've got a 3V PIC connected to your Zigbee module.....
poof.....Zigbee don't like 5 volts for long....
Jay |
|
|
J_GROUP
Joined: 25 Aug 2015 Posts: 18
|
|
Posted: Thu Aug 27, 2015 7:58 pm |
|
|
Yes, I use 3.3 volt power supply.
I tried some code at code library but still no result. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19498
|
|
Posted: Fri Aug 28, 2015 12:58 am |
|
|
You need to take fifteen steps back, and do some basic debugging....
Is your chip running, and running at the right speed - basic 'flash an LED' test?.
Then check your connections. Remember SDO on the PIC, is SDI on the device. The driver requires the hardware SPI connections, so on your PIC SDO is C5, SDI is C4, SCK is C3. As written the driver uses B1 for the chip select (note B1, not B0). Remember you need the fuse NOPBADEN, or port B wakes up set as analog, so the select line won't work.
Also disable the comparators.
You need to check that each line you use is operating normally, and will handle normal I/O.
One step at a time. |
|
|
J_GROUP
Joined: 25 Aug 2015 Posts: 18
|
|
Posted: Fri Aug 28, 2015 12:32 pm |
|
|
I used pin c0 for chip select. have any setting need? |
|
|
|