Firmware explanation - lots of code is confusing

Hey guys,

I have been looking through the SSC-32 firmware source code again to try and figure out how does jim get away with doing regex without actually using regex :neutral_face: And im stuck!! There is a massive amount of code and its all around the place and I can’t keep track of stuff :frowning: Does anyone here understand the SSC-32 code?

Reason I am asking is I will need a similar serial system where I can send characters to my PIC and it will execute different functions based on it. I could do the long if/ifelse/else statement but that would be a pain in the ■■■■ and using a large array seems quicker.

So far I understand that there is some sort of “rx_queue” and an array with all the commands and function that gets executed. What I don’t understand is where/how does the SSC-32 listen to the serial port to get incoming strings and parses them. And also where does the correct function get executed.

Thanks,
-robodude666

There is an interrupt routine for the tx and rx, these read a queue of chars sent either to or from the RS232. The main code calls process_commands and this takes each character and processes it.

I am trying to find a way of modifying the code to easily put things straight onto the rx buffer so that I can simply list my program in an array of strings “#5 P1600 T1000” style within the chip…

Antone got any ideas about that one, let me know… :slight_smile: