Page 1 of 3 123 LastLast
Results 1 to 12 of 28

Thread: any pic experts?

  1. #1
    Registered
    Join Date
    Apr 2005
    Location
    bih
    Posts
    462
    Downloads
    0
    Uploads
    0

    any pic experts?

    I am using PIC16F628. Why do I get around 1V on RB04 and 5.5V on all other RBs? I am using RAs for step and dir inputs, RB0-3 for X axis and RB4-7 for Y axis and my Y axis is playing up because of the missing step on RB4. And I tracked it down to a 1V output on RB4. I cannot find anything in the documentation as far as RB4 is concerned (like for example RA0-4 being analogue as well as digital inputs, software settable or something similar)

    I know what a burnt 16F628 looks like (i.e. - totally dead!) so I doubt I could've fried just a single output pin (RB4). Any ideas anyone before I go out and buy another PIC?


  2. #2
    Registered
    Join Date
    Apr 2005
    Location
    bih
    Posts
    462
    Downloads
    0
    Uploads
    0
    Oh, and BTW this is my controller/driver combo. I am a computer person by trade and in my line of work you learn to split things into manageable chunks or modules. Since I am new to electronics maybe what I have done is silly when it could've all been done on a single PCB but I thought splitting it all up makes it more manageable and easier to troubleshoot. Please feel free to slag my "design" off as much as you like. I am still learning.

    P.S. Transistors used are TIP122/BD901 and not TIP120 as per picture.
    Attached Thumbnails Attached Thumbnails any pic experts?-driver.png   any pic experts?-controller.png  


  3. #3
    Registered
    Join Date
    Apr 2005
    Location
    bih
    Posts
    462
    Downloads
    0
    Uploads
    0
    Would you kind electronic gurus please look at these and perhaps suggest what needs to be added to this setup (capacitors, diodes, transistors, tetrion field emitters, multiphasic discombobulators, etc...) so it looks like something a sane person might have "designed". Thanks!


  4. #4
    Registered
    Join Date
    Apr 2004
    Location
    Michigan
    Posts
    79
    Downloads
    0
    Uploads
    0
    Well I've burned out plenty of single pin i/o on PIC microcontrollers over the years. The rest of the chip would work just fine. I mark them as bad and use the chips for projects that don't require the dead i/o pin.

    Do you have a schematic of the circuit? To hard to see how the PIC is hooked up from your two posted images.

    If you can still program and do a flash memory verify, that means the chip is partially working.

    Jim


  • #5
    Registered abasir's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    361
    Downloads
    0
    Uploads
    0
    RB4 is the low voltage programming pin.
    To ensure proper use as I/O pin, your configuration bits (LVP bit) must be programmed correctly (i.e., LVP Disabled).

    I would also add current limiting resistors between the PIC pins and the transistor base as well as decoupling capacitor near each PIC (0.1uF). Also add a diode between the transistor common/emitter pins.

    PIC are spec for 5V, wondering why you're getting 5.5V on the pins.

    Something similar with what you're doing is here http://www.dakeng.com/u2.html
    Stupid questions make me smarter...
    See how smart I've become at www.9w2bsr.com ;-P


  • #6
    Registered pminmo's Avatar
    Join Date
    Jun 2003
    Location
    St. Peters, Mo USA
    Posts
    3,325
    Downloads
    0
    Uploads
    0
    If they were AVR's I could help some, but not PIC's. Why the bipolar transistors, and not MOSFET's?

    Phil
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com


  • #7
    Registered
    Join Date
    Apr 2005
    Location
    bih
    Posts
    462
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by abasir
    RB4 is the low voltage programming pin.
    To ensure proper use as I/O pin, your configuration bits (LVP bit) must be programmed correctly (i.e., LVP Disabled).
    I thought having read the PIC pdf that LVP disabled is only used if you're using RB4 for input. But I have LVP disabled anyway.

    I would also add current limiting resistors between the PIC pins and the transistor base as well as decoupling capacitor near each PIC (0.1uF). Also add a diode between the transistor common/emitter pins.
    I have 1k resistors between each RB and transistor base. Is that ok?
    I had zener diodes 4148 between C and E in my previous "design". I just left them out for no reason. Should I put them back in?
    PIC are spec for 5V, wondering why you're getting 5.5V on the pins.

    Something similar with what you're doing is here http://www.dakeng.com/u2.html
    Yes I know. My "design" is a cross-breed between dakeng's sample circuit and linistepper (it's using dakeng "layout" and linistepper transistors - tip122)


  • #8
    Registered
    Join Date
    Apr 2005
    Location
    bih
    Posts
    462
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by pminmo
    If they were AVR's I could help some, but not PIC's. Why the bipolar transistors, and not MOSFET's?

    Phil
    I don't know, that's what linistepper uses so I thought I might as well stick to that. Got any better suggestions for me? I'm listeninig


  • #9
    Registered
    Join Date
    Apr 2005
    Location
    bih
    Posts
    462
    Downloads
    0
    Uploads
    0
    And here are the schematics for the two
    Attached Thumbnails Attached Thumbnails any pic experts?-controller-sch.png   any pic experts?-driver-sch.png  


  • #10
    Registered
    Join Date
    Apr 2005
    Location
    bih
    Posts
    462
    Downloads
    0
    Uploads
    0
    I made a mistake. I'm having problems with RB03 not 04! I simply counted from 1 but forgot that the first RB i/o pin is RB0 not RB1! So it's definitely RB03 I'm having problems with.


  • #11
    Registered abasir's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    361
    Downloads
    0
    Uploads
    0
    Ensure LVP is disabled and TRISB set for output. Write a simple code to set RB4 to HIGH. Measure the voltage on RB4, if still not 5V, probably the bit is fried. Get a new PIC
    Stupid questions make me smarter...
    See how smart I've become at www.9w2bsr.com ;-P


  • #12
    Registered
    Join Date
    Apr 2005
    Location
    bih
    Posts
    462
    Downloads
    0
    Uploads
    0
    Ok will do. One more thing. I'm currently using the internal 4MHz oscillator. To add an external 20MHz crystal (the metal can thingamabob) it's just a matter of connecting one leg to OSC1 and the other to OSC2 pins and setting the HS flag in icprog and that's that? I have a feeling the PIC is struggling to get all the step/dir signals at 4MHz when running two axis at the same time rather than just one. I had to set minimum pulse width to 20us and direction prechange to 50us and kernel speed to 25000Hz for it to work. Anything faster and it starts to become jerky and loses steps.

    Also has anyone built linistepper? Should I just throw all my stuff out the window and go with that?


  • Page 1 of 3 123 LastLast

    Similar Threads

    1. CNC Controller PIC 16F877 - From Brasil
      By elizeu in forum PIC Programing / Design
      Replies: 13
      Last Post: 07-28-2012, 12:21 PM
    2. PIC Open source Servo Driver Schematics development?
      By Rossz in forum Open Source Controller Boards
      Replies: 90
      Last Post: 10-26-2011, 04:37 PM
    3. Need PIC programmed
      By randyf1965 in forum CNC Wood Router Project Log
      Replies: 0
      Last Post: 03-26-2005, 06:56 PM
    4. pic chip SERIAL to step/dir and controll
      By berin in forum Open Source Controller Boards
      Replies: 13
      Last Post: 02-18-2005, 06:23 PM
    5. Posting pic from the galley
      By CNCadmin in forum CNCzone Club House
      Replies: 1
      Last Post: 07-10-2003, 06:30 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.