For the first time in many years I need to simulate I/O by using a signal function - specifically - toggle the T0 pin (P1.2 on a LPC915) as I am using Timer 0 as a counter. I have two problems, best described by a segment of code stripped down to try to find the fault.
SIGNAL void toggle_T0 (void) { while(1) { PORT1 |= 0x04; twatch (0.2); PORT1 &= ~0x04 twatch (0.2); } } void main (void) { }
Even with this "nothing program" I get : error C129: missing ';' before 'void' with a line number that points to the signal declaration. Also, what is the correct name for the VTREG that defines the pins of Port 1?
Julian;
Check to see each line of code is terminated with a line feed/carriage return. Remember this is just a script file that is fed into the command line in the simulator. Since the command line steps to the next command with a carriage return the Signal script must use the same rules.
Bradford
Sounds like I really screwed up - I thought the keyword "signal" was a compiler directive. I think I need "Simulation 101". There are plenty of sample signal function on the Keil webste but I can find nothing about how to implement them.