Minimalist Numeric Display ideas


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Heckler View Post
    Question to Langure...
    Have you used these displays? Are they allready set up for serial communication? What baud?
    They are amazingly inexpensive... great find!

    Thanks
    Dwight
    I did, different programming environment -> http://tech.groups.yahoo.com/group/p...e/message/2016

  2. #2
    Join Date
    May 2010
    Location
    Chile
    Posts
    25


    Did you find this post helpful? Yes | No

    Default

    Just to add to the "idea pool" of minimal digit displays.

    Usually i'm too lazy to wire a seven segment display to a protoboard design just to debug a value in a variable.
    For that reason, i've made a small subroutine that blinks a led according to the value of a variable, For fast and ease of translation the variable is divided in its digits. Easy and fast to read.

    Here is a code sample:

    Code:
    '["asynchronous serial protocol for human eye..."]
    
    '[put your port configs and more here]
    '---- Define Variables part
    x var byte
    Y var byte
    n var byte
    
    '---- Main program
    main:
    
    x = 123 'any value
    gosub blinkled 'blink led according to X
    
    goto main
    
    '--- Subroutine part
    blinkled:  'blink led on GPIO.1 according to X value
        if x > 99 then '1st digit
            y = x dig 2
            gosub blinkloop 'blink the digit
            gpio.1 = 1 'one final large blink to separate digits
            pause 1000
            gpio.1 = 0
            pause 400        
        endif
        if x > 9 then  '2nd digit
            y = x dig 1
            gosub blinkloop 'blink the digit
            gpio.1 = 1 'one final large blink to separate digits
            pause 1000
            gpio.1 = 0
            pause 400
        endif    
        y = x dig 0    '3rd digit 
        gosub blinkloop 'blink the digit
    return
    
    blinkloop: 'blink subroutine
        for n = 1 to y 
            gpio.1 = 1
            pause 100
            gpio.1 = 0
            pause 400
        next n
    return
    Actually i've made a wrist clock out of it with just 2 leds as a display
    Enjoy

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts