1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Your first microcontroller project is?

Discussion in 'Microcontrollers' started by William At MyBlueRoom, Jul 7, 2006.

  1. mramos1

    mramos1 Active Member

    Joined:
    Sep 15, 2005
    Messages:
    2,403
    Likes:
    9
    Location:
    Boynton Beach, Florida USA
    So that is what Mike K8LH is talking about. :)

    And BeeBop. I have never talked back to my PC (via serial port) or used an LCD display, I blink an LED too.. Nothing wrong with that. I blink it to count what I read on the LDR/Cap curcuit I did last month.. I even knod my head as I count the hundreds, tens and ones. With a pause to tell me when to break.

    But I really want an ICD2 and to be able to debug on the PC connect to the target to be honest. bwhahaha..
     
  2. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    I could almost claim my EPG project (Electronic Program Guide) in '84 as my first (commercial) microcontroller project but it was really more a microcomputer than a microcontroller. It was the earliest version of the current TV Guide Channel complete with smooth scrolling TV listing data, locking time bars, and NTSC/RS-170 video overlay for Ads. Each EPG installed in a cable companies head-end would pull 24 hours of listing data and Ad data each day from one of the horizontal scan lines during the vertical blanking interval of the downlinked WGN signal. T'was a fun and rewarding project.
     
  3. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    mramos1,

    You haven't enjoyed life to the fullest until you've bounced characters back and forth between your PC and PIC project (grin).

    Haven't you tried a bootloader at all yet? I've got several different ones if you're interested. Take my 16F88 loader for example. I move a jumper, press reset, and get a prompt in hyperterminal from the PIC. Then I send it a hex file using the <send text file> menu item. Then I move the jumper back, press reset, and I'm running the newly downloaded program. NO PROGRAMMER (except when initially installing the 256-byte bootloader).

    Mike
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. mramos1

    mramos1 Active Member

    Joined:
    Sep 15, 2005
    Messages:
    2,403
    Likes:
    9
    Location:
    Boynton Beach, Florida USA

    OK, maybe a new tread with funnest/dumbest thing we have done with a microcontroller (with power applied to it of course)?

    And Mike K8LH, that is impressive.
     
  6. BeeBop

    BeeBop Active Member

    Joined:
    Dec 22, 2005
    Messages:
    1,281
    Likes:
    23
    Location:
    Vancouver Canada
    I really must agree:
    This is a good way to debug, too, but when you are really in trouble, simpler is better, thus the LED. I have only used a bootloader a few times (and most of those were with a Phillips LPC, rather than a PIC.) I think the reason is that the ICD2 is SO NICE! (I can see mramos1 turning green here.<grin>) I don't use the debug feature much, though. Perhaps I should play more with bootloading, though.
    I think the dumbest thing I have done is power a PIC backwards. It got hot, but still works well!
     
  7. mramos1

    mramos1 Active Member

    Joined:
    Sep 15, 2005
    Messages:
    2,403
    Likes:
    9
    Location:
    Boynton Beach, Florida USA
    Not for debug. But funny as people mention projects you recall others. I had pic in a closet parked in Miami with a serial connection to a Windows 95 machine (from like 199?) that I would telnet into the 95 machine via my telnet server I wrote and I could send a command on the serial port to the pic, and a [0 would drop a slolid state realy to power off a bunch of terminal server, [1 would bring them back up.. And it kept logs in EEPROM, that was a bit ago.
    [r would dump the report, it counted power cycles too. And we thought the
    Miami people were messing with our terminal servers (and they were).

    So I have done serial.

    I nabbed the one you left for Blueroom in a thread :) For the ICD2

    Sounds like it will save my bad knee. But how many pins are tied up. Jumper and serial?

    I did that on the DS5000 Dallas 8051 chip with real time clock many years ago. I really want to downoad and debug that way via MPLABS.
     
  8. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    That's a different type of bootloader. Not exactly what I was talking about.

    It doesn't necessarily need to tie up any pins if you're using the serial port in your project already. Even if you're not using the serial port there's nothing to prevent you from using the serial port pins during bootloading and then using them for some other function during 'normal' operation (perhaps using jumpers or a 3.5mm stereo plug for the serial bootloading connection).

    There are a couple ways to set up the bootloader 'trigger'. You can always use an existing switch on the project and simply press it when you press reset or power up to enter the bootloader. Don't press the switch when powering up or during reset to run your program the normal way. Another method I use for the bootloader 'trigger' is to install a jumper between the I/O pin and a piezo speaker. When I pull the jumper the piezo speaker is disconnected and I read a '1' on that pin. When I replace the jumper for normal speaker operation I read a '0' on that pin.

    Regards, Mike

    <added>

    It's easy to add almost "zero cost" serial port capability to your project boards with nothing more than a 3-pin or 4-pin 0.1" Berg connector and a 2K7 resistor. Make it a little fancier by using a 3.5mm stereo jack. Check out the Simple RS232-to TTL Adapter topic. Send me an email if you'd like one of those little PC adapters. I have a few made up and gathering dust.

    Here's a stepper motor board with serial port capability using nothing more than a 3.5mm stereo jack and 2K7 resistor (and that PC adapter).
    [​IMG]
     
    Last edited: Jul 8, 2006
  9. mramos1

    mramos1 Active Member

    Joined:
    Sep 15, 2005
    Messages:
    2,403
    Likes:
    9
    Location:
    Boynton Beach, Florida USA
    Yea, that was a bootloader for an ICD2 clone programmer.. I wanted that just to see if I wanted to build that one. It was not bad, but 2 pics, rather do Bills.

    If you have a small bootloader for the target pic, I would like to look at it for sure and special mods the target board I would need. That would be great.
     
  10. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Yeah, Bill's serial ICD2 design is great. I need a USB programmer for my laptop and the USB ICD2, unlike the Serial ICD2, will actually be quite usable as a debugger and I won't need a power brick for the USB-ICD2 or the target board. The '4550 and '877A in DIP40 and TQFP packages were samples so very little cost there. Layout for a through-hole design is progessing nicely on a 1.8" x 2.8" board.

    [​IMG]

    Here's my 16F87/16F88 serial bootloader for your amusement. Org' your programs at h'0100' instead of h'0000' and your ISR code at h'0104' instead of h'0004'. There are several other bootloaders out there much better than this one.

    Regards, Mike
     

    Attached Files:

    Last edited: Jul 8, 2006
  11. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,218
    Likes:
    640
    Location:
    Derbyshire, UK
    Interesting!, presumably based on the UK teletext system?, which never seemed to gain acceptance in the USA for some reason?.
     
  12. William At MyBlueRoom

    William At MyBlueRoom New Member

    Joined:
    Feb 28, 2006
    Messages:
    721
    Likes:
    1
    Location:
    Toronto, Canada
    Do you still have teletext in the UK? I saw it here in toronto in the early 90s' Love those chunky graphics and bold colours.
     
  13. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,218
    Likes:
    640
    Location:
    Derbyshire, UK
    Yes, but only on analogue terrestrial transmissions, the digital transmissions (both analogue and digital) include higher resolution 'digital' teletext.

    Teletext was invented by the BBC and IBA, and started transmissions in the 1970's sometime? - I remember building a hardware teletext decoder (from a Wireless World kit) and installing it in a Bush TV set.
     
  14. mramos1

    mramos1 Active Member

    Joined:
    Sep 15, 2005
    Messages:
    2,403
    Likes:
    9
    Location:
    Boynton Beach, Florida USA
    When the TRS-80 Color computer (6809 Motoro chip) came out, I did a community page on a channel that scrolled pages for the landlord.. For my apartment complex in the 80's.. Used a channel master to drop that channel into the cable feed..

    BUSH TV. God we are watching Nigel too.
     
  15. tinman10011001

    tinman10011001 New Member

    Joined:
    May 15, 2006
    Messages:
    19
    Likes:
    0
    Location:
    Wichita, KS
    My first project was a switch to toggle a LED. My first money-making project was a door entry keypad. I spent about $130 on the project, and was paid $100. Some of the mistakes that I made were buying componets that were too tall for the enclosure; a ribbon cable that I broke the pins off by bending them too much. Lesson learned: Buy double of the critical componets that you may need.
     
  16. zkt_PiratesDen

    zkt_PiratesDen New Member

    Joined:
    Jun 29, 2006
    Messages:
    68
    Likes:
    0
    I really cant say untill I check the statute of limitations.
     
  17. atferrari

    atferrari Well-Known Member

    Joined:
    Oct 8, 2003
    Messages:
    2,812
    Likes:
    121
    Location:
    Buenos Aires - Argentina
    Lesson part II

    And charge more to avoid loosing...
     
  18. Pedro Martins

    Pedro Martins New Member

    Joined:
    Aug 30, 2006
    Messages:
    9
    Likes:
    0
    Location:
    Portugal
    Last edited by a moderator: Dec 26, 2013
  19. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Pedro,

    Very nice design. The version 2 pcb looks very nice too.

    I have 5 PGA2310 samples just for a DIY preamp project. I also have LED Bar project code if you're interested.

    Could I trouble you for the 12F683 source too as another Gentleman requested on the DIY Hi Fi Forum? My email address is Mike-K8LH.

    Regards, Mike

    [​IMG]
     
  20. Scoobystu

    Scoobystu New Member

    Joined:
    Jul 5, 2006
    Messages:
    22
    Likes:
    0
    I'm still working on my first project....
    3 minute delay using a 12f683. Struggling a bit. Thinking of offering a reward to the first person who can sort it for me!
     
  21. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,218
    Likes:
    640
    Location:
    Derbyshire, UK
    Check the delay code generator on the PICList - does this mean I get a reward? :p
     

Share This Page