2014-05-20 11:42 PM
2014-05-21 12:05 AM
You should familiarize yourself with the ''volatile'' qualifier.
JW2014-05-21 12:31 AM
Thank waclawek.jan!
But I don't understand what you mean.Could you change my code for example?And could you show me the problem in my code?Thank you again.2014-05-22 06:51 AM
A lot to wade through there, would be a bit more efficient with a switch/case for the decode. Even an if/then/else construct.
The problem, I suspect, is that you are sending ASCII characters, '0' to '9' and expecting them to be decimal numbers 0 - 9, but are instead 0x30 .. 0x39. You need to translate them, either manually or with atoi(), and you perhaps want your 7-Segment decoder to have a default for characters it doesn't recognize, like '-'2014-05-22 12:17 PM
''would be a bit more efficient with a switch/case for the decode''
Or a lookup table; eg,2016-10-23 06:21 PM
Dear Sir Clive,
This user trying to make UART data to 4 digit display.In case of SPI data, if uint8_t pDataRx[4] is turned to BCD and fed them in 74HC4511 decoder-driver to 4 digit display. It will work? Further translation is needed or not?2016-10-24 12:14 PM
This user trying to make UART data to 4 digit display. In case of SPI data, if uint8_t pDataRx[4] is turned to BCD and fed them in 74HC4511 decoder-driver to 4 digit display. It will work? Further translation is needed or not?
Let's keep this in [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/converting%20BCD&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx¤tviews=101]one thread please.Present the data you are receiving, and what you want/expect to be displayed, provide multiple examples.
https://www.sparkfun.com/datasheets/IC/74HC4511.pdf