Exemplo n.º 1
0
void initVGA( void)
{
    // 1. init Timer 2
    TMR2_Period8BitSet( 253);
    
    // 2. UART baudrate
    SPBRGL = 0;

    // 3. PWM intialize
    PWM4_LoadDutyValue( 60);

    // 5. init the vertical sync state machine
    VState = SV_PREEQ; 
    VCount = 1;                 

    TMR2_Start();
    
    // Enable the Global Interrupts
    INTERRUPT_GlobalInterruptEnable();

    // Enable the Peripheral Interrupts
    INTERRUPT_PeripheralInterruptEnable();

} // initVGA
Exemplo n.º 2
0
void TMR2_LoadPeriodRegister(uint8_t periodVal) {
    TMR2_Period8BitSet(periodVal);
}