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 support@ccsinfo.com

Define QEI pins

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



Joined: 10 Mar 2010
Posts: 10

View user's profile Send private message

Define QEI pins
PostPosted: Sat May 08, 2010 6:30 pm     Reply with quote

Hi everybody !

I use dpPIC33FJ12MC202 to control DC motor, I want to use QEI module of this MCU, but in CCS, I can't find which function can define pins for QEI module. The function available is : setup_qei, qei_set_count, qei_get_count, qei_status.

How can I define QEI pins for this module ? Thanks !
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sun May 09, 2010 2:35 pm     Reply with quote

Because the QEI is a module and CCS is supporting the module, which typically when you "define" the pins, it might be for software or hardware. I don't think the QEI functions support a "software mode" like you might compare to SPI, I2C or RS232. So it's probably hardware only.

ADDITIONALLY, in this case, the QEI module is supported with the PeripheralPinSelect stuff on the PIC.

So you would probably use:

#pin_select QEA=PIN_xx
#pin_select QEB=PIN_xx
#pin_select INDX=PIN_xx

with xx= the RP pin supported by the PIC.

Try that and see how it goes.

If you get an error, submit it to CCS as they might need to update their table.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
pk178



Joined: 10 Mar 2010
Posts: 10

View user's profile Send private message

PostPosted: Sun May 09, 2010 11:10 pm     Reply with quote

Many thanks bkamen !

I didn't know the statement "#pin_select", I'be tried it, it's ok.

Your nick name seem you're in Viet Nam, I learning in HUT, nice to meet u ;)
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