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

I/O ports of PIC24HJ128GP306

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



Joined: 05 Sep 2007
Posts: 252

View user's profile Send private message

I/O ports of PIC24HJ128GP306
PostPosted: Thu Apr 07, 2016 11:42 pm     Reply with quote

Hi,
I wanna ask one question. I am using PIC24HJ128GP306 microcontroller.
In it only PORT B has complete 16 bits (B0 -> B15) other ports contains partial bits like (PORT C contains C1,C2,C12 -> C15),(PORT G contains G0->G3,G6->G9,G12->G15).
It means only PORT B input & output 16-bit data.
e.g
Code:

output_b(654);


Can other ports be use for input & output 16-bit data?
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Fri Apr 08, 2016 5:54 am     Reply with quote

You write some bits out one port, and then the others out another. However there is obviously a time penalty.
It's very unusual to want to be doing anything involving 16bit parallel data though. You could (for instance use an external shift register, and drive this from SPI. Given the speed this can be clocked it'll probably be faster than trying to split parts onto internal ports.
temtronic



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

View user's profile Send private message

PostPosted: Fri Apr 08, 2016 5:54 am     Reply with quote

I don't use the 24 series PICs but depending on the speed of data , sure ANY PIC can read/write 16 bits.

Simply create a function to read 1 port then the 2nd,saving in two inline mem locations. Use make16() if needed.

The 16 bits don't have to be 2 complete I/O ports either, can easily be split over 2-3-4 ports. Though the more ports the slower the function will be,but PICs are real fast these days!

The specs of the data transfer ( what's connected to the PIC) is important. Anything 'slow', say microseconds is not a problem, now nanosecond transfers could be.

Jay
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