TM1638 based LedAndKey pcb for AVR mikroPascal

Discussion on projects that are created by users and posted on mikroElektronika website.
Post Reply
Author
Message
mikroSeven
Posts: 161
Joined: 14 Mar 2016 10:24
Contact:

TM1638 based LedAndKey pcb for AVR mikroPascal

#1 Post by mikroSeven » 07 Aug 2017 11:37

Hi,

got this pcb working:
sku_399381_2.jpg
sku_399381_2.jpg (58.61 KiB) Viewed 6703 times
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!

20170807_114801.jpg
20170807_114801.jpg (935.3 KiB) Viewed 6703 times

Posted video of pcb working...

https://www.youtube.com/watch?v=1q_H-IFK3f4


All regards!
To DIY or not to DIY

mikroSeven
Posts: 161
Joined: 14 Mar 2016 10:24
Contact:

Re: TM1638 based LedAndKey pcb for AVR mikroPascal

#2 Post by mikroSeven » 08 Aug 2017 15:50

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
To DIY or not to DIY

mikroSeven
Posts: 161
Joined: 14 Mar 2016 10:24
Contact:

Re: TM1638 based LedAndKey pcb for AVR mikroPascal

#3 Post by mikroSeven » 08 Aug 2017 16:01

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...
To DIY or not to DIY

mikroSeven
Posts: 161
Joined: 14 Mar 2016 10:24
Contact:

Re: TM1638 based LedAndKey pcb for AVR mikroPascal

#4 Post by mikroSeven » 23 Aug 2017 21:10

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...
To DIY or not to DIY

mikroSeven
Posts: 161
Joined: 14 Mar 2016 10:24
Contact:

Re: TM1638 based LedAndKey pcb for AVR mikroPascal

#5 Post by mikroSeven » 23 Aug 2017 21:17

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.
Attachments
index.jpg
index.jpg (10.51 KiB) Viewed 5011 times
To DIY or not to DIY

mikroSeven
Posts: 161
Joined: 14 Mar 2016 10:24
Contact:

Re: TM1638 based LedAndKey pcb for AVR mikroPascal

#6 Post by mikroSeven » 30 Aug 2017 12:06

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...
tm1638 16 01b.jpg
tm1638 16 01b.jpg (54.8 KiB) Viewed 4988 times


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 )
tm1638 16 02b.jpg
tm1638 16 02b.jpg (53.28 KiB) Viewed 4988 times

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

mikroSeven
Posts: 161
Joined: 14 Mar 2016 10:24
Contact:

Re: TM1638 based LedAndKey pcb for AVR mikroPascal

#7 Post by mikroSeven » 30 Aug 2017 12:16

Here you see the positions of the scanned buttons in the scan-train [00..31]



tm1638 16 03.jpg
tm1638 16 03.jpg (12.84 KiB) Viewed 4988 times
To DIY or not to DIY

mikroSeven
Posts: 161
Joined: 14 Mar 2016 10:24
Contact:

Re: TM1638 based LedAndKey pcb for AVR mikroPascal

#8 Post by mikroSeven » 25 Sep 2017 15:42

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
To DIY or not to DIY

Post Reply

Return to “User Projects”