Comments (2)
(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.
Closing issue as question seems answered. Please respond if questions remain and issue needs to be reopened.
from tm16xx.
Related Issues (20)
- TM 1628 hometheater board HOT 7
- Request: TM1616 HOT 10
- Hello can i use this libraries for vfd display HOT 1
- Support TM1668 with 13-segment display (re: Request cs1694) HOT 9
- Request TM1629 - Buttons : 8 x 4 Multi - Segments x Digit : 8 x16 - Interface : DIO/CLK/STB HOT 1
- TM1624 HOT 1
- error: '_BV' was not declared in this scope HOT 3
- TM16xx without leading zeros issue
- Redefine Pins HOT 1
- Redback 7-segment led and button module with TM1652 HOT 4
- Add pinMode() to sendData() and getButtons() HOT 1
- Example for TM1640 with common anode 8x8 bicolor led matrix? HOT 17
- TM1650 Arduino library for 2 x 7 led display HOT 7
- regarding interfacing of tm1640 HOT 12
- Can I act _as_ a TM1651? HOT 4
- Problem while using this library with ESP32 HOT 3
- Hello Any help on TM1621 HOT 2
- how we can use 4 segment with dot HOT 1
- Another TM1652 device HOT 2
- Halt when useing RP2040 with TM1652 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tm16xx.