Hi,
got this pcb working:
I'using AVR ( Arduino2560 ) and mikroPascal.
My code is based on this C-coded project in libStock:
https://libstock.mikroe.com/projects/vi ... ed-amp-key
in combination with the TM1638 datasheet for more explenation.
I don't know C, but with 'reading' the C-code with some common-sence, the help of the datasheet
and modiyfing I managed to get things work!
Handling the STB-bit correctly, is a big key!
Posted video of pcb working...
https://www.youtube.com/watch?v=1q_H-IFK3f4
All regards!
TM1638 based LedAndKey pcb for AVR mikroPascal
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
TM1638 based LedAndKey pcb for AVR mikroPascal
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: TM1638 based LedAndKey pcb for AVR mikroPascal
Yeah! Reading-Keys functioning too!
The DIO-pin on the TM1638 is bi-directional.
On Arduino I'm using also 1 pin, it behaviour is depending on the code.
When things finished/running-smoot, I will post code here.
All regards. Marcel
The DIO-pin on the TM1638 is bi-directional.
On Arduino I'm using also 1 pin, it behaviour is depending on the code.
When things finished/running-smoot, I will post code here.
All regards. Marcel
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: TM1638 based LedAndKey pcb for AVR mikroPascal
There's som isue with the rising-time of the signal coming from TM1638 data-out.
So, after clockpulse 1-to-0, a delay_us(2) is needed.
More to come...
So, after clockpulse 1-to-0, a delay_us(2) is needed.
More to come...
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: TM1638 based LedAndKey pcb for AVR mikroPascal
Got the key-reading-methode working.
Will post it at the moment the code has been completed.
( I'm not a profesional )
Please be patient...
Will post it at the moment the code has been completed.
( I'm not a profesional )
Please be patient...
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: TM1638 based LedAndKey pcb for AVR mikroPascal
Ordered this one.
More buttons!
Actuately: the code I allready wrote for the 8-button-pcb, just needs some more code due of parameters/constants.
More buttons!
Actuately: the code I allready wrote for the 8-button-pcb, just needs some more code due of parameters/constants.
- Attachments
-
- index.jpg (10.51 KiB) Viewed 5011 times
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: TM1638 based LedAndKey pcb for AVR mikroPascal
The 16-button pcbs ha've arived. ( no LED's on it ).
The wirering is a bit different.
Controlling the 7-segments, is not going ok at the moment.
It should display: 0123 4567...
Reading the 16-buttons and display it in the 32-bit pulse-train on my LCD goes ok:
( see the '1' at position [2] of the pulse train. this is the most left/upper button )
This means that the wiring ( DIO, STB and CLK ) is ok.
Reading takes Write-command followed by changing the Arduino-pin DIO direction
( temporary from write to read ) etc etc...
Proberly the "adressing"of the 7-segments differs from the 8-button-pcb.
To be continued...
The wirering is a bit different.
Controlling the 7-segments, is not going ok at the moment.
It should display: 0123 4567...
Reading the 16-buttons and display it in the 32-bit pulse-train on my LCD goes ok:
( see the '1' at position [2] of the pulse train. this is the most left/upper button )
This means that the wiring ( DIO, STB and CLK ) is ok.
Reading takes Write-command followed by changing the Arduino-pin DIO direction
( temporary from write to read ) etc etc...
Proberly the "adressing"of the 7-segments differs from the 8-button-pcb.
To be continued...
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: TM1638 based LedAndKey pcb for AVR mikroPascal
Here you see the positions of the scanned buttons in the scan-train [00..31]
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: TM1638 based LedAndKey pcb for AVR mikroPascal
For the time being: I'm not gonna put more time in these 16-button board, to get hte 7-segments working properly.
For my project, the 8-button version will do!
( got this one fully funcional )
Kind regards! Marcel
For my project, the 8-button version will do!
( got this one fully funcional )
Kind regards! Marcel
To DIY or not to DIY