1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics Microcontroller Tutorial is up!

Discussion in 'Modding' started by Hazer, 30 Aug 2003.

  1. Hazer

    Hazer In time,you too will be relixalated

    Joined:
    14 Apr 2003
    Posts:
    957
    Likes Received:
    2
    [10-29-06]New location for the site:

    http://web.tampabay.rr.com/hazer/

    The first 11 chapters are done, and are viewable. Ive checked everything, including the code.

    The next 10 chapters will cover the peripherals, so they will take more time. I hope to have them done at least 1 or 2 per week. My ISP is limited to 300MB per month, so post here to let me know if Ive reached my limit. :clap:

    This info is open to public, and criticism is highly wanted. Mostly, if there is anything that needs improvement (as far as more explanation or pictures).

    Toward the end, I plan to add a few things like interfacing to common LCD controllers, servo and stepper motors, flash eeprom, external wiring considerations, and also a way to convert code from one device to another. That last peice being important, as some people may find it too hard to locate a PIC16F872 over like 16F84 (or just too lazy to find it).

    2 other projects in the works:

    Im drawing a schematic for an all-purpose JDM programmer that will program ALL 12, 16, 18 family Pics in DIP and PLCC packages. I may include Eagle PCB. :geek:

    Im doing the same for the ATMEL series AVRs. A one-does-all programmer (but not all AVRs, just the ones that support ICSP). The software is free (from Atmel), and the programmer will require external power source. If people like the Pic tutorials, I may move onto AVR stuff. :hip: :hip: :hip:
     
    Last edited: 1 Nov 2006
  2. TheEclypse

    TheEclypse What's a Dremel?

    Joined:
    11 Aug 2003
    Posts:
    407
    Likes Received:
    1
    the coding for the chip you used in the tutorials isnt too different to the coding for the 16F628 is it? cos im trying to make one of these but i want it to recieve output from the serial port and display the correct thing.
     
  3. Smilodon

    Smilodon The Antagonist

    Joined:
    25 Mar 2003
    Posts:
    6,244
    Likes Received:
    102
    :hehe: :lol: :hehe:

    the guide looks good.. i really want to learn this.. i havent read trough everything yet.. no time... :sigh:

    but do you know any chematics for a programmer? or is it already on the page?
     
  4. ChriX

    ChriX ^

    Joined:
    30 Aug 2001
    Posts:
    2,651
    Likes Received:
    4
    Plenty of schematics around on the net for programmers, however i'm lazy so I bought mine when I started with PICs ages ago. :)
     
  5. Hazer

    Hazer In time,you too will be relixalated

    Joined:
    14 Apr 2003
    Posts:
    957
    Likes Received:
    2
    Been outta town for past couple days.

    The 16F628 is a 18pin device. Im using a 28 pin device for the examples. The code wont work between the two, since Im using all of PortB as a byte input, all of PortC as a byte output, and a few pins on portA as control.

    I will give a custom schematic for the JDM design tonight. I might do a device table also, but in a few more days. I will at least give the names of devices that will be compatable with the example code.

    Since there are a few people who may only want to use 18 pin devices, I may go back and do more example code specific to those packages.

    EDIT: generic schematic is up for JDM programmer to work with IC-prog. Also a table with common PIC device names and how to connect to the JDM programmer. Example code is using a 28 pin device. Any 28 pin device will work with it, just change the list and include lines in the *.asm file. Please post any more concerns. Ive looked around for US and UK suppliers, but have not found much beyond the usual places.
     
    Last edited: 2 Sep 2003
  6. Hazer

    Hazer In time,you too will be relixalated

    Joined:
    14 Apr 2003
    Posts:
    957
    Likes Received:
    2
  7. Starbuck3733T

    Starbuck3733T Look out sugar, here it comes

    Joined:
    16 Sep 2002
    Posts:
    920
    Likes Received:
    0
    Looks real good but the bright white on black hurts my eyes :waah: :waah: s/tears/blood/g; :duh:

    Just my 2 cents.
     
  8. Wolfe

    Wolfe What's a Dremel?

    Joined:
    7 Sep 2003
    Posts:
    776
    Likes Received:
    1
    Sweet!!

    Ive been looking into PICs as a cheaper alternative to the Basic Stamp. This should give me the background on how to use them.

    What langage is used for programming? I have some experience in basic, and plan to learn something like C++ in the future.
     
  9. ChriX

    ChriX ^

    Joined:
    30 Aug 2001
    Posts:
    2,651
    Likes Received:
    4
    Most used is assembly, nice low level stuff :D

    I know there is a C compiler out there for PICs though, as i've used it before. :)
     
  10. Hazer

    Hazer In time,you too will be relixalated

    Joined:
    14 Apr 2003
    Posts:
    957
    Likes Received:
    2
    Ive started in assembly. Once Ive gone over the different hardware of the Pic, Ill start going over the language, like the microchip shortcuts and macros, and give a few links for Picbasic.

    I preffer to start with assembly.
     
  11. Hazer

    Hazer In time,you too will be relixalated

    Joined:
    14 Apr 2003
    Posts:
    957
    Likes Received:
    2
    Hey guys, I was just wondering if anyone was even using this tutorial. I have no idea about its usage. Im also hoping for feedback about its usefulness.

    Just trying to see if its helping or not.
     
  12. relix

    relix Minimodder

    Joined:
    14 Nov 2001
    Posts:
    5,948
    Likes Received:
    41
    I already have the PIC's, I'm just waiting to get some money for the programmer. I think it's a very useful tutorial! Really! It needs to be stickified, and I'm sure other people from outside bit-tech are reading it as well. Maybe time for a counter to get yourself some selfesteem? :thumb:
     
  13. Smilodon

    Smilodon The Antagonist

    Joined:
    25 Mar 2003
    Posts:
    6,244
    Likes Received:
    102
    the usefullness? it is WERY usefull.. i'm trying to learn about PIC at school... this guyde is our main info source! thanks! :thumb:

    I have big problems getting the programmer to work, but i have read a little tonight, so i know a few things to try out...
     
  14. Shepps

    Shepps Slacking off since 1986..

    Joined:
    5 May 2002
    Posts:
    1,492
    Likes Received:
    7
    Think im gonna recomend this to some of my mates in the lower 6th, as we this cud b useful for their pic coursework. Our teacher doesn't really know that much about pic :|
     
    Last edited: 7 Oct 2003
  15. Smilodon

    Smilodon The Antagonist

    Joined:
    25 Mar 2003
    Posts:
    6,244
    Likes Received:
    102
    my teachers doesn't know ANYTHING about PIC... LOL :wallbash:
     
  16. Hazer

    Hazer In time,you too will be relixalated

    Joined:
    14 Apr 2003
    Posts:
    957
    Likes Received:
    2
    :) Thanks guys.

    Smilodon: Which programmer are you using, and what is the problem? I may be able to help.

    Just so everyone knows, this tutorial is only publicized for bit-tech forum readers. I have no adds (cept the ones attached to the counter) and make no money from this. It was purely for the people here to take advantage of. Of course, word of mouth doesnt hurt.


    Update: Ive collected enough empty soda cans to purchase a few things like a stepper motor and oscilloscope to build more steps. The peripherals are where some of the intesting features come in to play.

    Coming soon:
    beyond-8bit-math routines
    stepper motor control
    RPM sense wire reading
    voltage and temperature monitoring
    HD44780 LCD interfacing
    general circuit interfacing techniques

    And Ive been working on some general electronics guides too for more simple components.

    Future add-ons:
    PLD (GALS and PALS) programming, techniques, and DIY programmers.

    ;)
     
  17. nleahcim

    nleahcim What's a Dremel?

    Joined:
    22 Apr 2003
    Posts:
    550
    Likes Received:
    1
    What about a DIY PIC programmer? That would be simply awesome!
     
  18. Smilodon

    Smilodon The Antagonist

    Joined:
    25 Mar 2003
    Posts:
    6,244
    Likes Received:
    102
    i'm usning a simple JMD (or was it JDM?) programmer... One is a bought one i got from my teacher and one is a homebulidt one...

    problem is that i just can't write to the PIC. at the best i can write one line (the second one) of the HEX code...

    of course this won't work... I have tried several things, and several computers... inernal and external powersuply... Nothing... I have also tried several programs and hex files... Have also tried dos-based programs...
     
  19. Hazer

    Hazer In time,you too will be relixalated

    Joined:
    14 Apr 2003
    Posts:
    957
    Likes Received:
    2
    Im assuming your using an F series Pic. Try just reading from the Pic to see whats in it. Also, have you seen a different chip work in the programmer?
     
  20. Smilodon

    Smilodon The Antagonist

    Joined:
    25 Mar 2003
    Posts:
    6,244
    Likes Received:
    102
    it's a PIC 16F 84...

    I have tried reading it... it has a working ledchaser program.. i have 1 couple of those.. one is the original one witch holds the program i'm trying to get into the other ones... I have 2 other chips that i try to program the ledchaserprogram into... all are the same type...

    I know the programmer have been used to program some PIC's buildt in a card.. (can't remember what they are called... it's a "creditcard" with a chip buildt in it)... I think it have been used to other things aswell, but i'm not sure... Anyway, it has "PIC16C84" and "PIC16F84" printed on it, so i guess it _should_ work... but it doesn't :sigh:

    Do i have too low voltage to program them?

    When the program tries to verify i get a message that says something about failed at adress 000h (IIRC)
     

Share This Page