Author Topic: 4 Digit 7 Segment Serial Display  (Read 2249 times)

0 Members and 1 Guest are viewing this topic.

Offline buffalo_denTopic starter

  • Newbie
  • Posts: 3
  • Country: gb
4 Digit 7 Segment Serial Display
« on: February 13, 2019, 10:20:12 pm »

Hi Guys,

I have a 16 character data stream coming into the Arduino from a device through serial, I am trying to display 4 of the characters (11,12,13,14) on a 4 Digit 7 Segment Display.

Example 1 16 Character data stream - l 0 ' ' 5 0 ' ' l 1 H O R N ' '
Example 2 16 Character data stream - l 0 ' ' 7 0 ' ' l 1 1 5 1 1 ' '

(so what I would like to display on the 4 digit 7 segment display is (HORN)
(so what I would like to display on the 4 digit 7 segment display is (1511)

Im not to sure how to display the characters in their correct form (Eg. 1 = 1 Instead of 49 which I believe is the dec value) also i'm not sure how I would go about extracting just the 4 digits out of the 16 digit string.

Would anyone be able to help me with this? :)
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2331
  • Country: 00
Re: 4 Digit 7 Segment Serial Display
« Reply #1 on: February 14, 2019, 05:43:31 am »
 

Offline TomS_

  • Frequent Contributor
  • **
  • Posts: 854
  • Country: gb
Re: 4 Digit 7 Segment Serial Display
« Reply #2 on: February 14, 2019, 01:59:38 pm »
Im not to sure how to display the characters in their correct form (Eg. 1 = 1 Instead of 49 which I believe is the dec value) also i'm not sure how I would go about extracting just the 4 digits out of the 16 digit string.

Would anyone be able to help me with this? :)

If the characters you want to display are always in the same position, you could buffer all received characters in RAM and then look at the memory locations corresponding to the positions in the string you want. You would need to know how to determine when one string has finished being transmitted so that you can reset the buffer pointer to position zero.

If the characters you want are always at the end of a string, you could cycle all characters through a 4 position buffer such that at the end of receiving a string your buffer contains the 4 characters you want. Again you need to know how to determine when a string is finished so you can then process the 4 characters.

Font wise, you can come up with anything you want and drive your display(s) via GPIOs, shift registers, whatever you need to produce the output you need. 7 segment displays need a bit of creativity, or you could look at using 14/16 segment displays instead.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf