comparison src/ostc3.inc @ 28:fcaf94b913db

rx isr
author heinrichsweikamp
date Sat, 20 Jul 2013 16:02:35 +0200
parents 9df2c8e018fe
children 53a09c1b7410
comparison
equal deleted inserted replaced
27:a0fc5d6c207e 28:fcaf94b913db
17 17
18 #include <p18f87k22.inc> 18 #include <p18f87k22.inc>
19 #include <ports.inc> ; Portmap 19 #include <ports.inc> ; Portmap
20 20
21 #DEFINE softwareversion_x d'0' ; Software version XX.YY 21 #DEFINE softwareversion_x d'0' ; Software version XX.YY
22 #DEFINE softwareversion_y d'98' ; Software version XX.YY 22 #DEFINE softwareversion_y d'99' ; Software version XX.YY
23 #DEFINE softwareversion_beta 1 ; (and 0 for release) 23 #DEFINE softwareversion_beta 1 ; (and 0 for release)
24 24
25 #DEFINE comm_service_key 0xABCDEF 25 #DEFINE comm_service_key 0xABCDEF
26 26
27 ;----------------------------------------------------------------------------- 27 ;-----------------------------------------------------------------------------
28 28
29 #DEFINE CCP1CON_VALUE b'00001100' ; PWM1 for LED dimming 29 #DEFINE CCP1CON_VALUE b'00001100' ; PWM1 for LED dimming
30 #DEFINE T2CON_ECO b'00000100' ; 1:1 Postscaler, 1:1 Prescaler, Timer 2 start -> 980Hz (Good compromise of no-flicker and efficiency) 30 #DEFINE T2CON_ECO b'00000100' ; 1:1 Postscaler, 1:1 Prescaler, Timer 2 start -> 980Hz (Good compromise of no-flicker and efficiency)
31 #DEFINE T2CON_NORMAL b'00001110' 31 #DEFINE T2CON_NORMAL b'00001110'
32 #DEFINE T2CON_FASTEST b'00001110' ; 1:2 Postscaler, 1:16 Prescaler, Timer 2 start -> 1960Hz (no-flicker) 32 #DEFINE T2CON_FASTEST b'00001110' ; 1:2 Postscaler, 1:16 Prescaler, Timer 2 start -> 1960Hz (no-flicker)
33
34 #DEFINE TMR0H_VALUE .245 ; RX Timeout (~3ms)
33 35
34 ; Timing for button hold-down flags 36 ; Timing for button hold-down flags
35 #DEFINE TMR1H_VALUE_FIRST .255-.128 ; in steps of 7,8125ms -> 1s 37 #DEFINE TMR1H_VALUE_FIRST .255-.128 ; in steps of 7,8125ms -> 1s
36 #DEFINE TMR1H_VALUE_CONT .255-.32 ; in steps of 7,8125ms -> 0.25s 38 #DEFINE TMR1H_VALUE_CONT .255-.32 ; in steps of 7,8125ms -> 0.25s
37 #DEFINE TMR1H_VALUE_CONT_DIVE .255-.64 ; in steps of 7,8125ms -> 0.5s 39 #DEFINE TMR1H_VALUE_CONT_DIVE .255-.64 ; in steps of 7,8125ms -> 0.5s