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: 19535
Posted: Tue Apr 07, 2015 8:44 am
#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
Posted: Wed Apr 08, 2015 4:18 am
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 !!!
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.
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