Hello, I'm currently using uVision 2.33. I've written the following function in the function editor to simulate an RC5 signal which I want to detect on P1.1:
define button "Start P1.1 Toggle", "p11_toggle()" define button "Stop P1.1 Toggle" , "signal kill p11_toggle" signal void Generate0() { P1 &= ~0x02; /* pull T2EX(P1.1) low and generate interrupt */ twatch( 889 ); P1 |= 0x02; /* pull T2EX(P1.1) high */ twatch (889); } signal void Generate1() { P1 |= 0x02; /* pull T2EX(P1.1) high */ twatch( 889 ); P1 &= ~0x02; /* pull T2EX(P1.1) low and generate interrupt */ twatch (889); } signal void p11_toggle() { while (1) { // Bit1: start Generate1(); // Bit2: indication Generate1(); // Bit3: toggle Generate0(); // Bit4: system5 Generate0(); // Bit5: system4 Generate0(); // Bit6: system3 Generate0(); // Bit7: system2 Generate0(); // Bit8: system1 Generate1(); // Bit9: command6 Generate1(); // Bit10: command5 Generate0(); // Bit11: command4 Generate0(); // Bit12: command3 Generate0(); // Bit13: command2 Generate1(); // Bit14: command1 Generate0(); swatch( 1 ); } }
*** function 'p11_toggle', error 99, line 27: signal() already activated p11_toggle() *** error 99: signal() already activated
*** error 34, line 9: undefined identifier
The second one is a real nice solution. Thanks for this input, Jon! Rgds, --Geert