CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC SPI interface with Zigbee MRF24J40MA

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
J_GROUP



Joined: 25 Aug 2015
Posts: 18

View user's profile Send private message

PIC SPI interface with Zigbee MRF24J40MA
PostPosted: Thu Aug 27, 2015 10:27 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Aug 27, 2015 11:15 am     Reply with quote

Look in the code library. Fully translated driver sitting there.
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Aug 27, 2015 2:47 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Aug 27, 2015 7:58 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Aug 28, 2015 12:58 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Aug 28, 2015 12:32 pm     Reply with quote

I used pin c0 for chip select. have any setting need?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group