x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Making use of a 7 segment LCD

1 2 3
C:Amie Page Icon Posted 2023-06-18 10:19 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,990
Location:
United Kingdom
Status:
We have done that and you got gibberish.
My first 3 numbers were to set character 4, 3 and 2 respectively using a 4x8bit unsigned long.

Did you try 64 first?
 Top of the page
C:Amie Page Icon Posted 2023-06-18 10:21 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,990
Location:
United Kingdom
Status:
I wonder if LedSetCcontrast is related to the matrix display or the notification LED? If it is the matrix, then it shoots down the idea that it is waiting for command headers.
 Top of the page
I dunk for bananas Page Icon Posted 2023-06-18 10:21 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
704
Location:
Europe
Status:
C:Amie - 2023-06-18 10:19 PM


We have done that and you got gibberish.
My first 3 numbers were to set character 4, 3 and 2 respectively using a 4x8bit unsigned long.

Did you try 64 first?


How do you mean try 64 first exactly? My apologies
 Top of the page
WinCEDev Page Icon Posted 2023-06-18 10:23 PM
#
Avatar image of WinCEDev
Factorite (Senior)

Posts:
76
Location:
Europe
Status:
Could you link us the forum thread you found? Perhaps that will help to further shed a light on things.
 Top of the page
C:Amie Page Icon Posted 2023-06-18 10:25 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,990
Location:
United Kingdom
Status:
e.g.
LedSetDigitsFn ledSetDigits = (LedSetDigitsFn)pFunction; unsigned int digits1 = 64; unsigned int digits2 = 4294967295; ledSetDigits(digits1); ledSetDigits(digits2); FreeLibrary(hDll); return 0;
 Top of the page
I dunk for bananas Page Icon Posted 2023-06-18 10:27 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
704
Location:
Europe
Status:
WinCEDev - 2023-06-18 10:23 PM


Could you link us the forum thread you found? Perhaps that will help to further shed a light on things.


Of course!
Here it is: https://www.mikrocontroller.net/topic/210759?page=single#2345506 (towards the end of the post)
It's all German, but using Google Translate to translate the page should work well, and if we need to get a more precise translation I can do it
 Top of the page
C:Amie Page Icon Posted 2023-06-18 10:47 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,990
Location:
United Kingdom
Status:
Any change with 64?
 Top of the page
I dunk for bananas Page Icon Posted 2023-06-18 11:03 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
704
Location:
Europe
Status:
C:Amie - 2023-06-18 10:25 PM


e.g.
LedSetDigitsFn ledSetDigits = (LedSetDigitsFn)pFunction; unsigned int digits1 = 64; unsigned int digits2 = 4294967295; ledSetDigits(digits1); ledSetDigits(digits2); FreeLibrary(hDll); return 0;


I gave this a try, but it just returned the same gibberish as before when calling 4294967295
 Top of the page
C:Amie Page Icon Posted 2023-06-18 11:12 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,990
Location:
United Kingdom
Status:
Which makes sense as the function is sending a long, but I was hoping that digit 4 would be different that time.

The control codes are:

64 set to write mode with incremental addressing

128 turn the display off

136 turn back on

137 - 143 should change the dimming

They should be 1 byte though, not 4.

I'll have a think in the morning, heading off now. Night.
 Top of the page
C:Amie Page Icon Posted 2023-06-19 10:02 AM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,990
Location:
United Kingdom
Status:
I assume that you tried your experiment sending in a byte array to the function and that it crashed? Are there any overloaded versions of the function, can you get the full function definition out of the tool?

What usually happens with these matrix displays is that you have to process the matrix controller through a series of state changes in order to change a value, but your function dump is not showing anything like that.

Usually a typical data flow would be:
Set the command pin to low
Send the receive data write command (64)
Set the command pin to high
Set the command pin to low
Send each byte to the matrix with the data values
Set the command pin to high

After sending FFFFFFFF failed, I was hoping that it just needed to be prefixed with the command instruction, but evidently not.
 Top of the page
I dunk for bananas Page Icon Posted 2023-06-19 2:03 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
704
Location:
Europe
Status:
I did try sending an array to it, but that just resulted in more random characters
There's an executable belonging to the system that writes to the display as part of its functioning which I've tried to disassemble to see how it calls the DLL, but sadly my knowledge of MIPS assembly isn't good enough to understand what's truly going on

Do you perhaps know how I could figure out how it's calling the DLL?

Edited by I dunk for bananas 2023-06-19 2:09 PM
 Top of the page
C:Amie Page Icon Posted 2023-06-19 9:58 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,990
Location:
United Kingdom
Status:
The fact that it hasn't been caught as a runtime exception when passed an array or a long uint suggests that it's overloaded or a bizarrely typed generic.

Did you send in an array of uint or array of bytes?
_int8 arr[0] = 255;
_int8 arr[1] = 255;
_int8 arr[2] = 255;
_int8 arr[3] = 255;

Not without having symbols and a watcher on the debug executable, no. My ASM is non-existent.

It doesn't have an overload for
_int8 data = 255;
ledSetDigits(data,data,data,data)
Does it? That has to force a crash now, surely?
 Top of the page
I dunk for bananas Page Icon Posted 2023-06-29 5:41 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
704
Location:
Europe
Status:
Apologies for the silence, life threw me a curveball!

It doesn't have an overload for _int8 data = 255; ledSetDigits(data,data,data,data) Does it? That has to force a crash now, surely?


I think this is a bingo. The display now reads 8.8.8.8.
 Top of the page
I dunk for bananas Page Icon Posted 2023-06-29 7:12 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
704
Location:
Europe
Status:




(hpcf.jpg)



Attachments
----------------
Attachments hpcf.jpg (45KB - 0 downloads)
 Top of the page
stingraze Page Icon Posted 2023-06-29 10:15 PM
#
Avatar image of stingraze
Subscribers
H/PC Vanguard

Posts:
3,684
Location:
Japan
Status:
Congratulations!
 Top of the page
1 2 3
Jump to forum:
Seconds to generate: 0.281 - Cached queries : 72 - Executed queries : 10