I have a PC which sends a 5 bytes of data to a PIC microcontroller. Byte 0 is the % character (lets pic know there is incoming data), byte 1 is ASCII "!" ( to identify that next incoming byte is to control the state of a single power relay), byte 2 ( is the power relay control data), byte 3 is ASCII "?" (used to signal that the next byte of data that will control one of several other mux relays), byte 4 is the mux relay data. Currently the Pic sends only byte 4 to the FPGA UART to control 1 of 43 mux relays. I would like to eliminate the Pic microcontroller all together and just use the FPGA (CMOD S6) to parse those 5 bytes and control all the relays. I'm not sure how to parse these 5 bytes by looking for ASCII characters %, !, and ?. Do I use case statement maybe? Any example on how something like this is done? Yes, I am new at FPGA's but not programming. It is probably simple but I'm drawing a blank on this because of lack of experience. Thanks for any suggestions, it is appreciated.
Question
Bryan_S
I have a PC which sends a 5 bytes of data to a PIC microcontroller. Byte 0 is the % character (lets pic know there is incoming data), byte 1 is ASCII "!" ( to identify that next incoming byte is to control the state of a single power relay), byte 2 ( is the power relay control data), byte 3 is ASCII "?" (used to signal that the next byte of data that will control one of several other mux relays), byte 4 is the mux relay data. Currently the Pic sends only byte 4 to the FPGA UART to control 1 of 43 mux relays. I would like to eliminate the Pic microcontroller all together and just use the FPGA (CMOD S6) to parse those 5 bytes and control all the relays. I'm not sure how to parse these 5 bytes by looking for ASCII characters %, !, and ?. Do I use case statement maybe? Any example on how something like this is done? Yes, I am new at FPGA's but not programming. It is probably simple but I'm drawing a blank on this because of lack of experience. Thanks for any suggestions, it is appreciated.
I am doing this in VHDL.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.