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

How is T4CK setup for DSPIC33EP256MU806

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



Joined: 25 May 2007
Posts: 26

View user's profile Send private message

How is T4CK setup for DSPIC33EP256MU806
PostPosted: Tue Apr 07, 2015 8:03 am     Reply with quote

hi everybody;

I used DSPIC33EP256MU806

I want to read T4CK ... which one RP pin or How is the setup for read

setup_timer4(TMR_EXTERNAL);
value=get_timer4();

RP ?
RPI ?
#pin_select ?

Thanks...
Ttelmah



Joined: 11 Mar 2010
Posts: 19457

View user's profile Send private message

PostPosted: Tue Apr 07, 2015 8:44 am     Reply with quote

#PIN_SELECT

#PIN_SELECT is CCS's way of controlling RPO and RPI.

So:
Code:
#PIN_SELECT T4CK=PIN_E5

Will setup RPI to connect T4CK to PIN_E5

Now only caveat (doesn't apply in this case), is when dealing with outputs, CCS will not automatically set the TRIS for output, when an output device is selected. So you have to manually use 'output_drive' to set this.

Obviously also you need to disable any fixed peripherals also on the pin (PWM etc. on the example pin).
1980best



Joined: 25 May 2007
Posts: 26

View user's profile Send private message

PostPosted: Wed Apr 08, 2015 4:18 am     Reply with quote

why not write in .h file ??
Code:

#PIN_SELECT T4CK=PIN_xx  ---> for timer4 read
#pin_select U1TX=PIN_xx     ---> for uart tx send
#pin_select U1RX=PIN_xx     ---> for uart rx get
#pin_select OC1=PIN_Dxx     ---> for pwm select pin

where is the custom code ??

custom code write in the microchip product datasheet !!!

T1CK Timer1 external clock input.
T2CK Timer2 external clock input.
T3CK Timer3 external clock input.
T4CK Timer4 external clock input.
T5CK Timer5 external clock input.
T6CK Timer6 external clock input.
T7CK Timer7 external clock input.
T8CK Timer8 external clock input.
T9CK Timer9 external clock input.


U1CTS UART1 Clear-to-Send.
U1RTS UART1 Ready-to-Send.
U1RX UART1 receive.
U1TX UART1 transmit.

OSC1 Oscillator crystal input. ST buffer when configured in RC mode; CMOS
otherwise.
OSC2 Oscillator crystal output. Connects to crystal or resonator in Crystal
Oscillator mode. Optionally functions as CLKO in RC and EC modes.


OCFA Compare Fault A input (for Compare channels).
INT0 External Interrupt 0.


SCK1 Synchronous serial clock input/output for SPI1.
SDI1 SPI1 data in.
SDO1 SPI1 data out.
SS1 SPI1 slave synchronization or frame pulse I/O.
jeremiah



Joined: 20 Jul 2010
Posts: 1340

View user's profile Send private message

PostPosted: Wed Apr 08, 2015 9:38 am     Reply with quote

It's in the compiler manual. I definitely recommend you take some time to read that so you know how all the features work.
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