how can create STIMULI FILE to use in the avrstudio ?

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

for the AVR STUDIO the SIMULATOR PORT STIMULI in the OPTION menu Opens the Port Stimuli dialog box that from it we can open a stimuli file for each port as we wish.
but now the problem is how i can create this stimuli files firstly? to open it later!
or i can ask by another way , what is the program that create a NEW file with *.sti format ?
where *.sti is the extension of the stimuli files.

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Studio help says:
Each line of the log file has the following format: Cycle:Data. The Cycle field is in decimal format and the Data field is in hexadecimal format. [..] The format of the stimuli file is the same as for the Port logging. Note that only pins set as inputs are affected
You have to edit the stimuli file yourself, using some text editor.

Hope this helps,
SIS

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi!

Currently, the easiest way is (as SIS mentioned) to make a port logging file, understand the syntax, then edit this file and save it as a .sti file.

Best regards,

Morten, AVR tech. support, Atmel FAE

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For clarification the correct format:

The first number is the clock cycle to to force the value after the :
The value after the : is in hex
The below example was part a stimulus I wrote

000000156:FF "program counter" = 156 : stimulus = 0xFEh
000000175:FE
000157914:FD
000315653:FC
000473392:FB
000631131:FA
000788870:F9
000946609:F8
001104348:F7
001262087:F6
001419826:F5
001577565:F4
991577565:F4

A point to note: AVRStudio 3.22 does not maintain the last stimuli in your stimulus file after you run out of stimulus lines in your file. (I call this a bug and according to Morten the Studio group will hopefully address it in the next release. For now the work around is to add one final stimulus line at the end of your file at a clock cycle that is "far out" in time i.e. longer than you will stimulate to. That way you can maintain the second to the last stimulus for some time longer than you will likely simulate to.)

Hope this helps.

Cheers

Erick