• Correctly truncating a binary counter sequence

    2 days ago 0 comments

    I was working with a 7493 counter last night. This is a TTL 4-bit counter with a two independent sections, a divide by 2 and a divide by 8. It also has two reset to 0 pins which are ANDed. You can use it as a divide by N counter where N is less than 16, provided N doesn't have more than two 1 bits in the binary representation. So to divide by 6 you would reset at 110.

    I wanted to divide by 12 so I decided to divide by 6, then divide by 2, so that I would have a 50% duty cycle waveform on the last output. So I connected the reset pins to bits 1 and 2.

    The first section did divide by 6, but the second section stayed at 0. I tried several chips with the same symptom so not just one bad chip. What was happening?

    After a while I realised that the count sequence was:

    0000, 0001, 0010, 0011, 0100, 0101, 0110 -> 0000

    So the divide by 2 section never reached 1.

    The correct way is to divide by 2, then divide by 6, and to connect the reset to bits 2 and 3. The sequence then becomes:

    0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100 -> 0000

    I have to give up the 50% duty cycle, but that's cosmetic. My mistake was taking the meaning of independent too far. The counters do work independently except for the reset function. Sometimes concepts can be oversimplified.

  • TI website 404 page

    06/20/2019 at 14:33 0 comments

    Screenshot of a diagnostic I got clicking on a dead link. I thought it was amusing, that's all.

  • A review of Elecrow's PCB service

    06/18/2019 at 09:04 0 comments

    When I saw on PCBShopper, a PCB fab price comparison site, that Elecrow was having a EOFY sale of USD0.99 for up to ten 100x100 mm boards, shipping extra, I decided to sample their service. (This sale, until 23/06/2019, appears to be available to all, not just new signups, but can only be availed of once.)

    First of all I should mention that my project is not demanding at all, it uses THT components on a 0.1 inch pitch grid. It does however have quite a few chips, and 66 nets.

    This time I sent in my first design using Kicad (eeschema, pcbnew and freeRouting). I had already debugged the circuit on a breadboard and also double checked using the Design Rule Checker (DRC) and the very useful Highlight Net feature of pcbnew. The latter is the desktop equivalent of doing a continuity check on the wires in the schematic, and will guard you from rookie errors like forgetting to connect the (invisible) power pins of a component.

    Elecrow's PCB order page has the usual selection of options. I took the cheapest options which were all I needed. You also specify a Gerber package (zip or rar) there. I didn't find a link to a Gerber viewer but there are many online viewers elsewhere. There is an instruction page explaining how to order, and the technical parameters. As soon as you have entered all the parameters and uploaded a Gerber file, you will be asked to pay, by credit card or PayPal. This is in contrast to my previous fab (PCBWay) where it underwent checking by a staff member before I was emailed to start the job by paying.

    After I had paid, I received email thanking me for my order. After a while my account page showed the order In Production. No other feedback. I supposed this was good and meant that my job had passed the design rule checks, but can be disconcerting if you were expecting some feedback.

    My job stayed In Production for a week, even though such jobs normally take only 2 days. There was no progress display. It's possible that they assigned jobs from the offer a low priority. Elecrow is not just a fab but also do assembly, and make modules. For $1, I can't complain. So I just busied myself with other stuff.

    A week later, I got an email saying that my order had shipped, with an attached photo of the package just before insertion into a parcel bag.

    I had taken the cheapest postage option, PLT Express, (did I already mention I'm cheap? 😀) so I was prepared for a long wait. But I was surprised a week later when I was notified that the package had cleared customs and would be delivered in a day or two. And so it was. From submission to receipt was just over 2 weeks, a nice surprise. It turns out that PLT Express is run by DHL. I wonder why if Elecrow can get the service that cheap, the other fabs don't use this service. Postage charges may be different for other countries.

    The package was a sealed bubble wrap one, and contained 11 boards, 1 spare just in case. (Wonder if one would get 6 if one ordered 5?)

    So how is the quality of the boards? The front copper side:

    The back copper side:

    I have absolutely no issues with their work, they did a good job and merit the review stars they have on the PCBShopper site. It's just that their customer facing site is not so polished.

    Well it took me a while before I assembled it and then some procrastination before I worked up the courage to power it up (did I draw the schematic correctly, did I use enough bypass capacitors, and all sorts of worries) but it works fine.

    A clock using the DS1287 as RTC. Two IC positions are not populated as those are used if one wants to drive multiplexed LEDs directly. U7 is a boost voltage converter for driving strings of LEDs in larger displays.

    But there are lessons I will take to the next Kicad design. I should probably put the mounting holes in the schematic instead of just the PCB so that they can...

    Read more »