The most basic way to do it would be to turn an IO port on/off after a certain amount of delay cycles. Here is a simple one for the PIC12F863 using HiTech C.
#include <htc.h>
__CONFIG(FCMDIS & IESODIS & BORDIS & UNPROTECT & UNPROTECT & MCLRDIS & PWRTEN & WDTDIS & INTCLK);
void init(){
// CHANGE ANALOG CHANNELS TO DIGITAL I/O
CMCON0 = 0x07; // SET COMPARATOR OFF, CIN and COUT PINS AS I/O
ANSEL = 0x00; // SET ANALOG INPUTS OFF
TRISIO = 0x00; // SETUP I/O BITS
GPIO = 0x00; // SET I/O BITS LOW
}
void main(){
init();
while(1){
GPIO =0x01;
_delay(50000); // delay 50k cycles
// 50k cycles seems to work good when using the internal clock
GPIO = 0x00;
_delay(50000);
}
}
And just add a switch between GPIO0 and the Right Trigger.
Im a beginner at this stuff just like you, so if i get corrected, listen to them.