Hi all,
I am using a 7 segment display that uses a SPI like input.
I have a set of character codes as hex. To display a P I would write 0xCE (11001110) - where each bit refers to a segment (the 8th being a decimal point)
That works on an Arduino where I wrote a function to output the codes, however I thought I'd use SPI on the mbed to achieve the same result.
It kind of half works - I can get the display to show characters - but it seems to be that mbed is outputting backwards to what the display wants (or the display wants the characters backwards :) )
So instead of sending 0001 it sends 1000
Is there a setting for SPI to achieve this or am I going to have to work out all the character codes again? :)
Alternatively a function that takes hex, converts to binary, reverses it and then converts back to hex.
James
Hi all,
I am using a 7 segment display that uses a SPI like input.
I have a set of character codes as hex. To display a P I would write 0xCE (11001110) - where each bit refers to a segment (the 8th being a decimal point)
That works on an Arduino where I wrote a function to output the codes, however I thought I'd use SPI on the mbed to achieve the same result.
It kind of half works - I can get the display to show characters - but it seems to be that mbed is outputting backwards to what the display wants (or the display wants the characters backwards :) )
So instead of sending 0001 it sends 1000
Is there a setting for SPI to achieve this or am I going to have to work out all the character codes again? :)
Alternatively a function that takes hex, converts to binary, reverses it and then converts back to hex.
James