No Script, No Fear, All Opinion
RSS icon Home icon
  • EEVblog #17 – I hope your next project DOESN’T work!

    Posted on July 11th, 2009 EEVblog 18 comments

    I hope your next project DOESN’T work!, dual-purpose I/O pins can be a trap, and www.octopart.com
    (P.S Sorry about the audio, been playing around with a new mic)

    Be Sociable, Share!
    • http://www.danielbjohnson.net Daniel

      You are very correct. Microcontrollers, like the PICs, sometimes have as many as 5 or 6 different hardware functions on a single pin. Its really a headache, why they are all defaulted to Enabled from the factory, I dont know. Why must I always disable analog hardware on the pins, Microcontroller pins are more often used for logic so they should be defaulted that way to digital.

      Good Ep.

      • http://www.alternatezone.com/eevblog admin

        I know, its crazy with microcontrollers, defaulting to I/O would be the most sensible. Even if they default to something, it’s still good programming practice to specifically enable the mode you want anyway.
        The joys of using such flexible devices.

    • Bruno

      Hey there,
      just wanted to say that I found your blog really interesting. Good job !
      Just a suggestion: whenever you are drawing on the board, try to lay it somewhere so it can be still. Moving it around can make things more confusing.
      The same goes for products reviews. It would be great if you could place the product close to the camera (covering a part of the screen) so we can have a better look at it without it moving around.

      Keep up the good job !

      • http://www.alternatezone.com/eevblog admin

        Thanks for the feedback.
        I’ve been thinking about the whiteboard and how best to utilise it (limited space in my lab doesn’t help).
        Anyone else got any feedback on the whiteboard thing? (and does anyone actually prefer the current moveable approach?)

    • http://aonomus.wordpress.com/ aonomus

      Hi,

      Perhaps for the whiteboard and interleaved graphics, edit the video as to continue the voiceover while displaying the waveform.

      Also if you have a little bit of cash around you could try playing with a Wacom or other drawing tablet which lets you draw graphics, and record the video on a computer.

    • http://hackedgadgets.com Alan Parekh

      Hi David,

      Great video. I am not sure why you made the note about the audio. I thought the audio for this video was better than the audio on some of the past ones. Most noticeably was the lack of camcorder motor noise.

      As noted by Daniel I have banged my head against this issue with PICs, thinking that the chip has a bad pin only to find out later that it’s in a mode that I didn’t expect.

      • http://www.alternatezone.com/eevblog admin

        The audio is great for the first half but the last half has a lot of audio hum in it. Very clear and loud in my headphones, less so with speakers. I must have moved a mains cable or something near the external mic cord during that bit.
        Should be no more motor noise as I’m using an external mic now.

    • jacob

      Gday mate, enjoying the blog a lot.

      Dual/multi purpose pins are a nightmare for new users of microcontrollers for sure. A year or two ago I was having all sorts of problems using an ADC input on an atmega8 design I had. The atmega allows you to do silly things that are not smart at all, such as enabling a pullup on a pin that is also being used as an ADC. Took me quite a while to figure it out, as the sensor I was using did NOT like having 5v pumped into it’s output pin, it ran “warm” (not a great idea for a hall effect sensor!) and I kept thinking it was a power issue.

      Until I found my “bog standard” code did not disable the internal pullup.

      In reference to cast #17, I certainly learnt something new that day!

      Cheers
      Jacob

      • http://www.alternatezone.com/eevblog admin

        Yep, we’ve all been there!
        A lot of people complain about this with PIC’s, but it’s almost every micro on the market, and with many other devices as well. With micro’s you (should) know the pins are all multi purpose, but with other less obvious devices it can be a bigger trap. Doesn’t help when the schematic symbol you have doesn’t identify it as such either!

    • John Mcvirgo

      David, do you record your blog from your workshop, or your employer?

      • http://www.alternatezone.com/eevblog admin

        This is my home workshop.
        My current employers lab is rather mediocre!, but they do have a professional in-house film studio which would be good, but adding CGI equipment on the blue screen just doesn’t have that authentic feel :->

        Dave.

    • creid

      Absolutely right on the value of failure! Of course a thousand people out there are tearing their hair out right now over a project and cursing you. The thing that taught me to program carefully and as OO as possible was failure do to spagetti/hack/etc code. Even more true with uc design/programming as you forget to switch that one pin over and all kinds of crazyness ensues.

      LOVE your blog

    • Mastro Gippo

      I left this comment on an Hackaday post about default PIC inputs, hope it clears things up: “All analog capable ports are configured as analog input at startup to consume less power: if left as digital input and disconnected, the input floats and can change its state randomly, and every time the state changes the input transistor consumes current. Microchip says that for low power consumption the PIC should have every unused pin configured:
      - as an analog input
      - as an input, but tied to vcc or gnd
      - as an output, unconnected

      Since mchp doesn

    • http://www.mastrogippo.it Mastro Gippo

      Another thing: I would have solved your problem in half the time, simply by cutting the trace (or lifting a pin if it’s not BGA) to see if the problem was on the ADC side or the FPGA side! That would have saved all the time debugging the FPGA code! ;)

      • http://www.alternatezone.com/eevblog admin

        Hindsight is 20/20 when you are being lead up the garden path!

    • http://www.davidaa.co.uk David

      Ahhhh my latest didn’t work! I spent hours checking over everything, expecting the worse. It appears I have somehow miss-read a datasheet and used 100K resistors instead of 100R. I feel pretty stupid!

      Dave

    • Jack

      Thanks a lot! ;)

      Your wish came true. I was working on a pretty simple project, and it worked perfectly on the breadboard. As soon as I pulled out the solder, though, things went downhill. I accidentally shorted the battery, and had a diode that was connected on one side to a correct pin on my 555, but wasn’t connected to anything on the other side.

      Oh well, I eventually got everything worked out.

      Seriously, though, troubleshooting your own projects, while sometimes frustrating, can also be fun. It’s a challenge worth taking on.

    • ac

      Some of the most annoying problems are contact issues. I don’t know if they’ve fixed it but when I built my current PC couple years ago it, 3D-using apps were crashing often and sometimes I got bluescreens. When building similar computer for a friend I didn’t initially build it into a case for testing purposes. It didn’t boot! At this point I discovered just how loose the PCI-Express connector is, atleast with the graphics card I had. It can sway to the sides in the slot. It can do that even when being screwed to the case as those PCI-style slots are quite low in height, so reinserting and aligning the card has helped at times.

      My old 486 didn’t recognize disk controllers, and reinserting cards didn’t help. Then I thought maybe the connectors have oxidized or something. I scraped each connector (not sure if that was the best idea but..) thoroughly and it started working!

      Similar thing, my first breadboard project with 555 chip.. I couldn’t get it work no matter what. Then I moved it to another part of the breadboard and it started to work..