|
|
View previous topic :: View next topic |
Author |
Message |
pk178
Joined: 10 Mar 2010 Posts: 10
|
Define QEI pins |
Posted: Sat May 08, 2010 6:30 pm |
|
|
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: 1615 Location: Central Illinois, USA
|
|
Posted: Sun May 09, 2010 2:35 pm |
|
|
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
|
|
Posted: Sun May 09, 2010 11:10 pm |
|
|
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 ;) |
|
|
|
|
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
|