Hi Everyone.
I am sure the solution to this issue is simple, but I just can't get there. I have read a lot in the forum plus also on line and do not understand why my programme does not work.
Here goes:
1) When i compile the arduino file for mega328p - the TM1637 works perfectly.
2) When i change the chip (and relevant ports) to 16F877A, TM1637 does not work - nothing shows on the digits.
Oscilloscope shows activity on the data and clock lines - but no activity on the TM1637
I have set the fuses to use the crystal and again the oscilloscope shows that this is working. I have tested using a different 16f877a with the same result.
As i mentioned - i am sure i am missing something obvious so any waise suggestions would be appreciated
Thanks
Alan
adding DIR made no difference
.
If i use tm1637a.h then gcbasic does not recognise TMWrite6Dig
From the documentation- TM1637-6d.h is for the 6 digit model - which is what i am using
ie GCbasic will not compile it
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I see that TM1637-6d.h is mentioned in a discussion on this forum, but the help doc online and all the examples I could find are for the 4 digit display and use tm1637a.h
In which documentation did you find TM1637-6d.h ?
Please ping back when and if you get it to work. I have been thinking of getting and using one of these 6 digit displays...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
also - using the tm1637a.h and changing the write command to TMWrite4Dig did not work either
The oscilloscope shows the data on the clk and dat lines but nothing on the display
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
same voltage - 5v battery pack. And i know it seems weird but does not run on a microchip
I also tried a 16f628a (i did not forget to use a 10k pull up resistor to 5V on MCLR)
Happy for any crazy suggestions
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
from what i understand reading the docs is that tm1637a.h is for the 4 digit display and the tm1637_6d is for the 6 digit display. They are not interchangeable.
the example for 6 digit display uses TMWrite6Dig to write to the display and this only works with the tm1637_6d library.
if you look at the attachments in my first message, you will see the programme that works on arduino. All i changed was the chip and the ports for the 16f877a and then compiled it.
And as i mentioned nothing shows on the display. Oscilloscope show activity on the clk and data lines as expected.
thanks for helping - much appreciated
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
try adding ' TMchar_Bright = 10 ' this is mentioned in the first referenced docs 'without this the display is blank' maybe this is affecting the program? just maybe.
i seem to have lost my 877A's to try it out.phooey...my board is a TM1638! no help here
Last edit: HackInBlack 2025-05-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
just tried it - no luck. No activity on display.
If you have one of these units - what other microchip ic's do you have to be able to try?
I tried a 16f628a with the same results but i have some other ic's as well
Weird that it works perfectly on Arduino
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Everyone.
I am sure the solution to this issue is simple, but I just can't get there. I have read a lot in the forum plus also on line and do not understand why my programme does not work.
Here goes:
1) When i compile the arduino file for mega328p - the TM1637 works perfectly.
2) When i change the chip (and relevant ports) to 16F877A, TM1637 does not work - nothing shows on the digits.
Oscilloscope shows activity on the data and clock lines - but no activity on the TM1637
I have set the fuses to use the crystal and again the oscilloscope shows that this is working. I have tested using a different 16f877a with the same result.
As i mentioned - i am sure i am missing something obvious so any waise suggestions would be appreciated
Thanks
Alan
Try adding a delay before sending the first number. Something like: wait 500ms
yeah i tried that. I gave it 2 seconds before writing to the module but it made no difference.
Thx for the suggestion :-)
Try adding:
dir PORTB.6 out
dir PORTB.7 out
No idea if it makes a difference, since you already have a signals on the pins.
Last edit: Roger Jönsson 2025-05-13
Are you sure that you should not instead use:
#include <TM1637a.h>
Last edit: Roger Jönsson 2025-05-13
adding DIR made no difference
.
If i use tm1637a.h then gcbasic does not recognise TMWrite6Dig
From the documentation- TM1637-6d.h is for the 6 digit model - which is what i am using
ie GCbasic will not compile it
I see that TM1637-6d.h is mentioned in a discussion on this forum, but the help doc online and all the examples I could find are for the 4 digit display and use tm1637a.h
In which documentation did you find TM1637-6d.h ?
Please ping back when and if you get it to work. I have been thinking of getting and using one of these 6 digit displays...
it works fine when using arduino. But i can't duplicate using Microchip IC's
Here is the link to the documentation
https://gcbasic.sourceforge.io/help/_7_segment_displays_tm1637_6_digits.html
Thx for helping cos its driving me nuts trying to get it to work with microchip :-(
That documentation example use
include <TM1637a.h>
combined with TMWrite6Dig(sending only 4 digits) so I guess it may not be 100% correct.
Last edit: Roger Jönsson 2025-05-13
try this
https://sourceforge.net/p/gcbasic/discussion/629990/thread/de80c6381a/
also - using the tm1637a.h and changing the write command to TMWrite4Dig did not work either
The oscilloscope shows the data on the clk and dat lines but nothing on the display
Maybe you are the first one to actually test the tm1637 6digit with GC basic...
ha ha ha - looks thats way. Anyway its above my paygrade cos i can't work it out :-(
Hello, it works with the mega328p then it should work.
Running everything on the same voltage?
same voltage - 5v battery pack. And i know it seems weird but does not run on a microchip
I also tried a 16f628a (i did not forget to use a 10k pull up resistor to 5V on MCLR)
Happy for any crazy suggestions
i even used an inverter on the dat and clk lines (individually as well)
Made no difference - yes i was clutching at straws
Do you have a 4 digit one to test with?
nope
@Anobium While on the subject. The documentation example use
include <TM1637a.h>
combined with TMWrite6Dig. Is that correct?(TM1637_6d.h is not mentioned)
https://sourceforge.net/p/gcbasic/discussion/629990/thread/de80c6381a/
Last edit: Roger Jönsson 2025-05-13
from what i understand reading the docs is that tm1637a.h is for the 4 digit display and the tm1637_6d is for the 6 digit display. They are not interchangeable.
the example for 6 digit display uses TMWrite6Dig to write to the display and this only works with the tm1637_6d library.
if you look at the attachments in my first message, you will see the programme that works on arduino. All i changed was the chip and the ports for the 16f877a and then compiled it.
And as i mentioned nothing shows on the display. Oscilloscope show activity on the clk and data lines as expected.
thanks for helping - much appreciated
try adding ' TMchar_Bright = 10 ' this is mentioned in the first referenced docs 'without this the display is blank' maybe this is affecting the program? just maybe.
i seem to have lost my 877A's to try it out.phooey...my board is a TM1638! no help here
Last edit: HackInBlack 2025-05-14
just tried it - no luck. No activity on display.
If you have one of these units - what other microchip ic's do you have to be able to try?
I tried a 16f628a with the same results but i have some other ic's as well
Weird that it works perfectly on Arduino
"Must be a bi-directional port." -Are there any pullups resistors for CLK and DIO?
just tried that - no change