I used your 18F2620 version of the code for TM1637. It compiles OK, but in the subsequent test with the 18F2620 on a breadboard, the LED lights up and stays lit without anything happening to the LED module. In order to make sure that the PIC is working, I added a For-Next loop to make the LED blink 3 times for 500mS each as a diagnostic routine before the main code executes. Now, the LED blinks correctly telling me that the PIC is working properly at 32MHz. But this is what happens: 3 Blinks, gap of 1 second, 3 blinks and so on. I feel, the PIC is getting reset repeatedly.
Then I tried your original code with 12F1840. The compilation goes through without any errors. But when tested with the LED module, the LED stays lit and the TM1637 LED module does not light up.
Please let me know if you want me to post the code I used for the two PICs.




Bookmarks