Hi Rob

For the 25 value I used the h_small char (h)...
But the library I was working on is for gcbasic. No problem in sending it
to you, is easy to read.
Anyway, it might need the validation of others... or a rearranging of  the
chars...

Ah, just found the old one I corrected and with some additions... back in
2014.. but it has a different arrangement...
As I said, it needs some supervision...

On Sun, May 5, 2024 at 11:32 AM Rob CJ <[email protected]> wrote:

> Hi Vasi,
>
> I had a quick look and normally you should move 26 to 25 and 27 to 26 but
> that would mean that exisiting application might not work correctly
> anymore.
>
> An alternative would be to add 25 and use that for all segments off which
> is the same a space.
>
> If users to not mind the move (the first option) then I can change that.
>
> Suggestions are welcome.
>
> Kind regards,
>
> Rob
>
>
>
>
>
> ------------------------------
> *Van:* [email protected] <[email protected]> namens Rob CJ <
> [email protected]>
> *Verzonden:* zondag 5 mei 2024 07:48
> *Aan:* [email protected] <[email protected]>
> *Onderwerp:* Re: [jallib] Seven segment library
>
> Hi Vasi,
>
> Thanks for reporting is. Since you already fixed it can you give me the
> exact code change that you made?
>
> Ik will upload it for the next build.
>
> Thanks
>
> Kind regards,
>
> Rob
>
> ------------------------------
> *Van:* [email protected] <[email protected]> namens vasi vasi
> <[email protected]>
> *Verzonden:* zondag 5 mei 2024 06:37
> *Aan:* [email protected] <[email protected]>
> *Onderwerp:* [jallib] Seven segment library
>
> Hi guys,
> There is a problem with seven_segment.jal and if I remember, is not the
> first time I signaled this.
>
> If you look at it, there is a missing value, you jump from 24 to 26. in
> both the comment section where you document the library, and in the code
> section.
>
> The code from the value 25 is missing... now, not too big of a deal, as
> everything is functional, but, there is no really a 27 value (it will give
> you an error) and the 26 value will not return what you would expect to
> return. Hopefully, I am clearer now than back then in explaining the
> problem...
>
> Not a problem for me, I had my own corrections and adds... just saying...
> --
> Vasi
>
> --
> You received this message because you are subscribed to the Google Groups
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jallib/CABsDq%3D_qxMjuhCtEM_PV2GCG1WM%2BHv0pbh5%2Bi3fF-dXs6tP75w%40mail.gmail.com
> <https://groups.google.com/d/msgid/jallib/CABsDq%3D_qxMjuhCtEM_PV2GCG1WM%2BHv0pbh5%2Bi3fF-dXs6tP75w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jallib/GVXP195MB1637EEB3C890A8323109E4C4E61D2%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM
> <https://groups.google.com/d/msgid/jallib/GVXP195MB1637EEB3C890A8323109E4C4E61D2%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jallib/GVXP195MB163719F2267C9E1658855EEAE61D2%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM
> <https://groups.google.com/d/msgid/jallib/GVXP195MB163719F2267C9E1658855EEAE61D2%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>
> .
>


-- 
Vasi

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/CABsDq%3D-J7cfmz6Sy%3DO0KunVXg%2BvDXcdSKFSVQQLH8%3DqFydGXdQ%40mail.gmail.com.
'            _______________________________________________________
'  AAAA      Seven segment library
' F    B     -------------------------------------------------------
' F    B     Author: Wouter van Ooijen (c) 1998, all rights reserved
' F    B     Adapted-by: Joep Suijs, Vasile Surducan 25.08.2009
'  GGGG      Completed and adapted for GCBasic by Vasile Guță-Ciucur
' E    C
' E    C
' E    C
'  DDDD  P 

' The font for the 7 segment is stored in a table and you get the char from
' that font via a value passed as a parameter to get_seg_font(x) function. The 
' value of the parameter starts with zero which coresponds to the zero character
' from the font. So for a certain value you get a certain char, as follows:
 
' value 0 of the parameter is char 0
' value 1 is char 1
' value 2 is char 2
' value 3 is char 3
' value 4 is char 4
' value 5 is char 5
' value 6 is char 6
' value 7 is char 7
' value 8 is char 8
' value 9 is char 9
' value 10 is char A
' value 11 is char b
' value 12 is char C
' value 13 is char d
' value 14 is char E
' value 15 is char F
' value 16 is char S
' value 17 is char c
' value 18 is char r
' value 19 is char H
' value 20 is char i
' value 21 is char L
' value 22 is char o
' value 23 is char P
' value 24 is char U
' value 25 is char h
' value 26 is char u
' value 27 is char space
' value 28 is char N
' value 29 is char n
' value 30 is char G
' value 31 is char minus
' value 32 is char Y
' value 33 is char I
' value 34 is char t
' value 35 is char l
' value 36 is char J
' value 37 is char =
' value 38 is char degree
' value 39 is char menu
' value 40 is char 0. (number with decimal point at the end)
' value 41 is char 1.
' value 42 is char 2.
' value 43 is char 3.
' value 44 is char 4.
' value 45 is char 5.
' value 46 is char 6.
' value 47 is char 7.
' value 48 is char 8. 
' value 49 is char 9.
' value 50 is decimal point  alone

'You should define the following constant before including this header
' #define digit_common_anode true

'         PortD.76543210 - PortD on Arduino UNO, depending on the uc.    
'               pgfedcba 
#define seg_a b'00000001'
#define seg_b b'00000010'
#define seg_c b'00000100'
#define seg_d b'00001000'
#define seg_e b'00010000'
#define seg_f b'00100000'
#define seg_g b'01000000'
#define seg_p b'10000000'

#ifndef digit_common_anode
  #define digit_common_anode false ' default
  #if digit_common_anode = true
    #define digit_mask 0xFF
  #else  
    #define digit_mask 0x0
  #endif
#endif

dim seg_font(51) as byte

seg_font(1) = (digit_mask or (seg_a + seg_b + seg_c + seg_d + seg_f)) ' 0 
seg_font(2) = (digit_mask or (seg_b + seg_c)) ' 1
seg_font(3) = (digit_mask or (seg_a + seg_b + seg_g + seg_e + seg_d)) ' 2
seg_font(4) = (digit_mask or (seg_a + seg_b + seg_c + seg_d)) '3
seg_font(5) = (digit_mask or (seg_b + seg_c + seg_f + seg_g)) '4
seg_font(6) = (digit_mask or (seg_a + seg_c + seg_d + seg_f + seg_g)) '5
seg_font(7) = (digit_mask or (seg_a + seg_c + seg_d + seg_e + seg_f + seg_g)) '6 
seg_font(8) = (digit_mask or (seg_a + seg_b + seg_c)) '7
seg_font(9) = (digit_mask or (seg_a + seg_b + seg_c + seg_d + seg_e + seg_f + seg_g)) '8
seg_font(10) = (digit_mask or (seg_a + seg_b + seg_c + seg_d + seg_f + seg_g)) '9
seg_font(11) = (digit_mask or (seg_a + seg_b + seg_c + sseg_e + seg_f + seg_g)) '10 A
seg_font(12) = (digit_mask or (seg_c + seg_d + seg_e + seg_f + seg_g)) '11 b
seg_font(13) = (digit_mask or (seg_a + seg_d + seg_e + seg_f)) '12 C
seg_font(14) = (digit_mask or (seg_b + seg_c + seg_d + seg_e + seg_g)) '13 d
seg_font(15) = (digit_mask or (seg_a + seg_d + seg_e + seg_f + seg_g)) '14 E
seg_font(16) = (digit_mask or (seg_a + seg_e + seg_f + seg_g)) '15 F
seg_font(17) = (digit_mask or (seg_a + seg_c + seg_d + seg_f + seg_g)) '16 S
seg_font(18) = (digit_mask or (seg_d + seg_e + seg_g)) '17 c
seg_font(19) = (digit_mask or (seg_e + seg_g)) '18 r
seg_font(20) = (digit_mask or (seg_b + seg_c + seg_e + seg_f + seg_g)) '19 H
seg_font(21) = (digit_mask or (seg_c)) '20 i
seg_font(22) = (digit_mask or (seg_d + seg_e + seg_f)) '21 L
seg_font(23) = (digit_mask or (seg_c + seg_d + seg_e + seg_g)) '22 o
seg_font(24) = (digit_mask or (seg_a + seg_b + seg_e + seg_f + seg_g)) '23 P
seg_font(25) = (digit_mask or (seg_b + seg_c + seg_d + seg_e + seg_f)) '24 U
seg_font(26) = (digit_mask or (seg_c + seg_e + seg_f + seg_g)) '25 h
seg_font(27) = (digit_mask or (seg_c + seg_d + seg_e)) '26 u
seg_font(28) = (digit_mask or (0)) '27 space
seg_font(29) = (digit_mask or (seg_a + seg_b + seg_c + seg_e + seg_f)) '28 N
seg_font(30) = (digit_mask or (seg_c + seg_e + seg_g)) '29 n
seg_font(31) = (digit_mask or (seg_a + seg_c + seg_d + seg_e + seg_f)) '30 G
seg_font(32) = (digit_mask or (seg_g)) '31 minus
seg_font(33) = (digit_mask or (seg_b + seg_c + seg_d)) '32 Y
seg_font(34) = (digit_mask or (seg_b + seg_c)) '33 I
seg_font(35) = (digit_mask or (seg_d + seg_e + seg_f + seg_g)) '34 t
seg_font(36) = (digit_mask or (seg_e + seg_f)) '35 l
seg_font(37) = (digit_mask or (seg_b + seg_c + seg_d)) '36 J
seg_font(38) = (digit_mask or (seg_d + seg_g)) '37 = 
seg_font(39) = (digit_mask or (seg_a + seg_b + seg_f + seg_g)) '38 degree
seg_font(40) = (digit_mask or (seg_a + seg_d + seg_g)) '39 menu - then below numbers with dp
seg_font(41) = (digit_mask or (seg_a + seg_b + seg_c + seg_d + seg_f + seg_p)) ' 40 0. 
seg_font(42) = (digit_mask or (seg_b + seg_c + seg_p)) ' 41 1.
seg_font(43) = (digit_mask or (seg_a + seg_b + seg_g + seg_e + seg_d + seg_p)) ' 42 2.
seg_font(44) = (digit_mask or (seg_a + seg_b + seg_c + seg_d + seg_p)) '43 3.
seg_font(45) = (digit_mask or (seg_b + seg_c + seg_f + seg_g + seg_p)) '44 4.
seg_font(46) = (digit_mask or (seg_a + seg_c + seg_d + seg_f + seg_g + seg_p)) '45 5.
seg_font(47) = (digit_mask or (seg_a + seg_c + seg_d + seg_e + seg_f + seg_g + seg_p)) '46 6. 
seg_font(48) = (digit_mask or (seg_a + seg_b + seg_c + seg_p)) '47 7.
seg_font(49) = (digit_mask or (seg_a + seg_b + seg_c + seg_d + seg_e + seg_f + seg_g + seg_p)) '48 8.
seg_font(50) = (digit_mask or (seg_a + seg_b + seg_c + seg_d + seg_f + seg_g + seg_p)) '49 9.
seg_font(51) = (digit_mask or (seg_p)) '50 . decimal point

function get_seg_font(in xz as byte) as byte
  get_seg_font = seg_font(xz + 1)
end function

Attachment: rosso_seven_segment.jal
Description: Binary data

Reply via email to