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?
Thanks Andrew. The first link on your reply told me everything I needed to know.
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.
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
was a typo in the posting, NOT in my code
DO NOT DO NOT DO NOT EVER type code into a post use cut-and-paste
the threads that went astray because of the 'code' in the post and the code referred to were different are legio.
Erik
Should you really have a main() This isn't a C program but a simulator script. It just happens to look a bit similar to C.
Next thing - name for VREG depends on processor. Each supported processor have a web page here with information about what is supported etc. There you can find information about VREG names.
Before anyone picks up on it - the missing ; was a typo in the posting, NOT in my code.