![]() In order to debug a function, it must first be called from a script M-file. 8.2.1.1 Creating a Script File to Call a Function The factorial of 3 is 3×2×1=6, and so on. The factorial of the number 1 is 1 by definition. ![]() Twatch (250000) /* 250000 Cycles Time-Break */Ĭlick OK to close the Options for Target dialog. Printf (“Analog (%f) entered.\n”, limit) The twatch function reads the simulated clock of the processor and halts the script for a specified number of cycles. This generates a signal that ramps up and down and it is applied to the virtual register ADC1_IN1, which is channel 1 of ADC convertor 1. The debug script also generates a simulated voltage for the ADC. All of the simulated microcontroller “pins” appear as virtual registers that can be read from and written to by the script. ![]() The script file uses a C-like language to model the external hardware.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |