TM1637 and pic 18F26K20

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
bercioiu
Posts: 7
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 9:21 pm
Location: Romania
Has thanked: 6 times

Flowcode v10 TM1637 and pic 18F26K20

Post by bercioiu »

Hello everyone!
I have a problem with a component, namely TM16537! I can't use it with pic 18F26k20 at 64 MHz. If I put another pic, for example 16F1938 at 32 MHz, everything is ok. What am I doing wrong in the configuration? Thanks!
Attachments
contr_inc_2025_18F26K20.fcfx
(11.82 KiB) Downloaded 33 times

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 657 times

Re: TM1637 and pic 18F26K20

Post by medelec35 »

Hello.
Configuration including OSCTUNE looks correct, so I assume pin A0 is toggling every second?
Try reducing the speed to 32MHz, then check to see if the display is working correctly.
Martin

bercioiu
Posts: 7
Joined: Thu Dec 03, 2020 9:21 pm
Location: Romania
Has thanked: 6 times

Flowcode v10 Re: TM1637 and pic 18F26K20

Post by bercioiu »

It seems to be a problem with FC10, because I installed FC8 and is ok, everything works.
I also tried at 32 MHz but it still didn't work.
The LED is flashing correctly.
Attachments
FC8.jpeg
FC8.jpeg (94.58 KiB) Viewed 4456 times
contr_inc_2025_18F26K20_fc8.fcfx
(8.47 KiB) Downloaded 32 times

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 657 times

Re: TM1637 and pic 18F26K20

Post by medelec35 »

That is really odd as I don't have the same target device as you, hence using 27K42, running internal osc 64MHz and works as expected with FC10.
Its not like the component is using I2C as the data and clock are bit banged
Do you have a logic analyser?
If can you compare the ck and data for both FC10 and FC8
Martin

bercioiu
Posts: 7
Joined: Thu Dec 03, 2020 9:21 pm
Location: Romania
Has thanked: 6 times

Flowcode v10 Re: TM1637 and pic 18F26K20

Post by bercioiu »

Unfortunately I don't have a logic analyzer. I think the problem is from the setting of the delay between transitions, which is no longer in FC10.
Attachments
settings_TM1637.png
settings_TM1637.png (281.1 KiB) Viewed 4308 times

medelec35
Matrix Staff
Posts: 1956
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 657 times

Re: TM1637 and pic 18F26K20

Post by medelec35 »

Looking at your image for FC8, you have Display Type set to Cathode.
With the FC10 version, you have Display Type set to Anode.
Could that be the issue?
Martin

bercioiu
Posts: 7
Joined: Thu Dec 03, 2020 9:21 pm
Location: Romania
Has thanked: 6 times

Re: TM1637 and pic 18F26K20

Post by bercioiu »

Yes, I tried several settings and I did a print screen at a random setting. Anyway, in FC8, it works even if I put common anode or common cathode, probably a component leak...

bercioiu
Posts: 7
Joined: Thu Dec 03, 2020 9:21 pm
Location: Romania
Has thanked: 6 times

Re: TM1637 and pic 18F26K20

Post by bercioiu »

Same display, with two different hex FC8 :-)
Attachments
Cathode.jpg
Cathode.jpg (82.44 KiB) Viewed 4276 times
Anode.jpg
Anode.jpg (75.18 KiB) Viewed 4276 times

Post Reply