-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decimal delays #4
Comments
First of all sorry for the shoddy error handling, I'm working on cleaner error messages. The PRU Speak interpreter executes bytecode not the actual instructions. The python frontend in the userspace compiles the BotSpeak instruction and then gives the pru the byte code to execute. This is to make things faster and memory efficient. |
SInce each assembly instruction takes 5ns, why not have a WAITns? |
It's because it's hard to guarantee accuracy in terms of ns. A couple of inst here and there, you are already ~50-100 ns off. |
I'd like a delay of less than 1ms, so I tried:
SCRIPT
SET DIO[0], 1
WAIT 0.1
SET DIO[0], 0
WAIT 0.1
GOTO 0
ENDSCRIPT
RUN
I got the following:
Initializing PRU Speak
Illegal character '.'
Traceback (most recent call last):
File "./my_example_copy.py", line 87, in
ret = pru_speak.execute_instruction(EX6)
File "/root/pruspeak/src/userspace_lib/pru_speak/pruspeak.py", line 92, in execute_instruction
byte_code = parser.parse(inst)
File "/usr/local/lib/python2.7/dist-packages/ply/yacc.py", line 265, in parse
return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)
File "/usr/local/lib/python2.7/dist-packages/ply/yacc.py", line 921, in parseopt_notrack
lookahead = get_token() # Get the next token
File "/usr/local/lib/python2.7/dist-packages/ply/lex.py", line 387, in token
raise LexError("Scanning error. Illegal character '%s'" % (lexdata[lexpos]), lexdata[lexpos:])
ply.lex.LexError: Scanning error. Illegal character '.'
PRU Speak object deleted
BOTSPEAK allows decimal delays, does PRUSPEAK?
--Mark
The text was updated successfully, but these errors were encountered: