Coder Social home page Coder Social logo

reading data TM1620 about tm16xx HOT 2 CLOSED

maxint-rd avatar maxint-rd commented on June 5, 2024
reading data TM1620

from tm16xx.

Comments (2)

maxint-rd avatar maxint-rd commented on June 5, 2024

(For reference see the earlier posts in this issue)

Only 14 values? It seems you missed some bytes. Perhaps your MCU can't handle the speed or perhaps the reading is interrupted?

Let's compare these values to the values you read with the logical analyzer. These were your earlier readings:

digit value binary (LSB-first) segments display value
1 00 00 0 none blank
2 00 02 0 none blank
3 FD 04 10111111 F ABDECP 0.
4 7D 06 10111110 F ABDEC 0
5 7D 08 10111110 F ABDEC 0
6 0A 0A 01010000 not connected n/a

Now let's see if we can recognize some of you 14 SPI slave values. Note that these values are LSB-first, so to compare we need to translate them to the reversed (MSB-first) hexadecimal values:

dec bin reversed hex
0 0 0 00
64 01000000 00000010 02
191 10111111 11111101 FD
32 00100000 00000100 04
190 10111110 01111101 7D
190 10111110 01111101 7D
16 00010000 00001000 08
80 01010000 00001010 0A
241 11110001 10001111 8F
64 01000000 00000010 02
2 00000010 01000000 40
3 00000011 11000000 C0
0 0 0 00
0 0 0 00

If we put these hex values in a similar table as before, you can see how they compare and which ones are missing:

digit value binary (LSB-first) segments display value
1 - - missing
2 00 02 0 none blank
3 FD 04 10111111 F ABDECP 0.
4 7D - 10111110 F ABDEC 0
5 7D 08 10111110 F ABDEC 0
6 0A - 01010000 not connected n/a

As you can see the first bytes and sequence bytes 06 and 0A seem missing, but the rest of the data is there. After the 0A it follows with 8F which is a command (set display pulse-width 14/16th). Then the remainder 02 40 C0 00 00 seems to be the start of a new sequence.

For completeness: these were the command bytes you read with the logical analyzer. Note the matching 02 40 C0:

byte(s) content
1 command 0x02 (set display mode to 2, i.e. 6 digits of 8 segments)
2 command 0x40 (write data registers)
3-15 command 0xC0 + 12 data bytes (set starting address to 0x00, then write data bytes)
16 command 0x8F (set display on, set pulse-width to 14/16)

So I guess your challenge appears to be to start reading at the proper time (eg. when first command appears), and to not miss any bytes. Good luck with that!

from tm16xx.

maxint-rd avatar maxint-rd commented on June 5, 2024

Closing issue as question seems answered. Please respond if questions remain and issue needs to be reopened.

from tm16xx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.