/* Arlotto 2004 : pgm test interface c-bus */ #include //#define __DEBUG // à commenter pour mode autonome #ifdef __DEBUG __CONFIG (0x3739); #else __CONFIG(0x3D39); #endif #include "biosdem.h" #include "cbus.h" bit b ; void main(void) { CBUS_init(); for ( ; ; ) { if (RA4==0) { if ( b==0) { CBUS_PutByte(0x01); // reset CBUS_SendCommand2Bytes(0x84,0x04,0x4E ); // CTCSS = 74.4 Hz adresse 0 CBUS_SendCommand(0x82,0xF0); // BandWith = 2.7 % CBUS_SendCommand(0x8E,0x08); // IRQ mask Bit3 Tone IRQ CBUS_SendCommand(0x80,0x40); // Bit6 Enable Tone decoder b=1; } } else { b=0; } } }