Search found 185 matches

by Jon Chandler
Thu Jul 27, 2023 8:42 pm
Forum: Compiler
Topic: Using Timer1 to Measure Frequency
Replies: 4
Views: 2532

Re: Using Timer1 to Measure Frequency

Testing at 100, 200 and 400 Hz with the internal 32MHz oscillator yields slightly low values. Interestingly, switching to the 20MHz clock signal, also yields slightly low values, almost identical to the 32MHz values. I am forced to conclude that my signal generator is slightly off :wink: Using the 2...
by Jon Chandler
Thu Jul 27, 2023 7:22 pm
Forum: Compiler
Topic: Using Timer1 to Measure Frequency
Replies: 4
Views: 2532

Re: Using Timer1 to Measure Frequency

Yay, progress! Once I managed to enable the frequency generator output (details, details!) the LED showing an interrupt occurred starting flashing and I got a counter output. Thanks for cleaning up my mess of code. On to working out the equation for counts --> frequency. My goal is to make a frequen...
by Jon Chandler
Wed Jul 26, 2023 7:19 pm
Forum: Compiler
Topic: Using Timer1 to Measure Frequency
Replies: 4
Views: 2532

Re: Using Timer1 to Measure Frequency

Thanks Jerry, I'll give this a try later today.
by Jon Chandler
Wed Jul 26, 2023 1:23 am
Forum: Compiler
Topic: Using Timer1 to Measure Frequency
Replies: 4
Views: 2532

Using Timer1 to Measure Frequency

I'm working on a tachometer/frequency meter, but I'm rather lost. I'm following a Microchip document including a section "Using Timer 1 to Measure Frequency . It uses the method of triggering the gate with the input signal to measure the number of clock pulses that occur between input pulses. I prob...
by Jon Chandler
Sat Jan 28, 2023 7:13 am
Forum: Compiler
Topic: TM1637 LED Driver
Replies: 22
Views: 10294

Re: TM1637 LED Driver

Thanks Jerry for taking a look at the TM1637 board and getting it to work. I'm glad you solved the mystery to get it working! I've been working on this on a cruise ship without any gear besides a PICkit 2 and was feeling kind of stupid when several different approaches didn't work. I have the TM1638...
by Jon Chandler
Tue Jan 17, 2023 9:07 pm
Forum: Compiler
Topic: TM1637 LED Driver
Replies: 22
Views: 10294

Re: TM1637 LED Driver

Man this has been a slog! After getting the TM1638 board bent to my will, I added "the easy part" - a DS3231 clock module. I've used these before with good results, using the DS1307 RTC module available here. with some slight modifications. Easy, except for the fact that it didn't work. I'll spare y...
by Jon Chandler
Mon Jan 09, 2023 4:37 pm
Forum: Compiler
Topic: TM1637 LED Driver
Replies: 22
Views: 10294

Re: TM1637 LED Driver

I did say that earlier, based on comments posted around the TM1637. Seems to be a lot of confusing information around about these guys. The TM1638 datasheet is much improved over the TM1637 datasheet, and includes a detailed timing plot with minimum intervals shown. There are still a few parts that ...
by Jon Chandler
Mon Jan 09, 2023 1:34 pm
Forum: Compiler
Topic: TM1637 LED Driver
Replies: 22
Views: 10294

Re: TM1637 LED Driver

The TM1638 interface is completely different. No ack like the TM1637.

The TM1638 only drives the DIO line when scanning keys. If you don't request a key read, it will never try to drive DIO.

The TM1638 uses a 3 wire interface – clock, DIO and STB, which is more like /CS than a strobe.
by Jon Chandler
Sun Jan 08, 2023 7:16 pm
Forum: Compiler
Topic: TM1637 LED Driver
Replies: 22
Views: 10294

Re: TM1637 LED Driver

Wow. The TM1638 is much simpler to use! I'm not planning on reading the switches (at this point), so the clock is just push-pull for now. So the standard shift module works fine w/o any changes. The TM1638 data sheet takes some careful reading, but I configured the shift module, sent commands and my...
by Jon Chandler
Thu Jan 05, 2023 11:31 pm
Forum: Compiler
Topic: TM1637 LED Driver
Replies: 22
Views: 10294

Re: TM1637 LED Driver

I'm putting this on hold for now until I get home in a couple weeks. Hard to troubleshoot when you can't see what's happening. I took a look at the TM6318. It's got a more conventional shift-register type interface. It supports 8 digits instead of 6, and common anode OR cathod digits. Interestingly,...
by Jon Chandler
Mon Jan 02, 2023 8:49 pm
Forum: Compiler
Topic: TM1637 LED Driver
Replies: 22
Views: 10294

Re: TM1637 LED Driver

One question is answered anyway. The PICkit 3 (at least THIS PICkit 3) channel 3 does not function in the logic analyzer. And channels 1 and 2 are pretty much useless to me for this, as the clock and data line 10k pullup resistors won't have much impact against the 4.7k pulldowns on channels 1 & 2. ...
by Jon Chandler
Mon Jan 02, 2023 6:04 pm
Forum: Compiler
Topic: TM1637 LED Driver
Replies: 22
Views: 10294

Re: TM1637 LED Driver

I'm on a cruise and brought minimal stuff to get started on an "easy project"....which is becoming very frustrating! The version I'm trying to work on is bit-banging the clock and data lines, not using the shift module. I had high hopes when I found a version for Proton Basic that was nearly identic...
by Jon Chandler
Sun Jan 01, 2023 10:34 pm
Forum: Compiler
Topic: TM1637 LED Driver
Replies: 22
Views: 10294

Re: TM1637 LED Driver

Thanks Jerry,

I missed your post when I made my last post. Appreciate all the help for something that shouldn't be that difficult!

I'll let you know how it goes.

Happy new year. Let's hope it's a great one!

Jon
by Jon Chandler
Sun Jan 01, 2023 8:42 pm
Forum: Compiler
Topic: TM1637 LED Driver
Replies: 22
Views: 10294

Re: TM1637 LED Driver

I rolled up my sleeves, engaged my brain, and started from the data sheet. Progress is being made...I can at least see where it's hanging up. I flash LEDs for START, ACK and STOP. The unlined events occur and the program hangs. tm1637 time diagram.jpg The send subroutine is this. I inserted a number...
by Jon Chandler
Sun Jan 01, 2023 1:15 am
Forum: Compiler
Topic: TM1637 LED Driver
Replies: 22
Views: 10294

Re: TM1637 LED Driver

That didn't change anything. Just to verify my thoughts - the TM1637 module takes care of setting input/output state, so I don't need to do anything in the main program. I don't see any problems, it looks like the right commands are all being sent. Here's another reference and sample code which seem...