Array over serial transmission
joethumphrey
Posts: 25
Where can I find info on sending an array over a serial connection?
I'm using the FullDuplex module . I can send various variables in separate lines but is there a way to just send the entire array with one call?
to something like
and get the whole array sent?
I'm using the FullDuplex module . I can send various variables in separate lines but is there a way to just send the entire array with one call?
comms.dec(arr[0]) comms.dec(arr[1]) comms.dec(arr[2])
to something like
comms.dec(arr[%])
and get the whole array sent?
Comments
Using the repeat for testing but I have to have an "if" wrapper based on array fill for the send function.
Reading about locks right now.
With "trigger" being set elsewhere I seem to be getting a wiggle in the output.
In another cog, I set once a threshold is hit. Happens to be a comparison of a 3202 return, check for trailing edge of a signal.
What could be causing this sporadic variable?
I keep getting sporadic output unless I run the qualifier to beyond 1.
Like "2" or higher, then the random outputs to serial line quits.
With it (variable 'trigger') set as 0 or 1 , shouldn't it be one or the other?
Because I keep getting random data dumped on the serial out line with it checked on an if statement. If set the check number on the if statement higher I get no random data dumping. I labeled the if statement in bold.
You might have to do something like this:
Also
Took care of most of the random failures.
I can get fairly steady output now but anything faster than 115200 baud and it starts getting sporadic data over serial to a terminal.
Is there a way to get clean outputs at higher serial line rates?
Also, is there a way to pass multiple variables to a cog in ASM?
Like .
Or if I pass it a variable array , how do I interact with the variables in ASM.
Like
What would I use in the ASM side to interact with the different variables in the array?