584,830 active members*
5,457 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > Reversed Logic voltage to PICSTEP- What component to be replaced?
Page 2 of 3 123
Results 21 to 40 of 58
  1. #21
    Join Date
    Dec 2003
    Posts
    24216
    If you look in the original .asm code source file you will see the string for the config bits.

    __CONFIG _CP_OFF & _WDT_ON & _HS_OSC & _PWRTE_ON & _LVP_OFF & _MCLRE_OFF
    If you look in the box at the right of your programmer Hex display you will see the declaration: Configuration Word 0x3F46.
    This hex value is the compiled value equal to the __config string above.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  2. #22
    Join Date
    Apr 2006
    Posts
    3498
    Thank You Al
    If the config bits are right then what might be the problem invested a lot of time and money... It must work... I have to check the ATX power supply output....
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  3. #23
    Join Date
    Jan 2010
    Posts
    2141
    Again, just a suggestion that if you can recompile the source code, you should consider putting in (even temporarily) the ability to blink an LED (or otherwise output a signal that can be tested) under control of the firmware, so that you can verify whether the PIC's clock oscillator is running correctly or not.

  4. #24
    Join Date
    Dec 2003
    Posts
    24216
    One observation, although I wouldn't think it has any bearing on your present problem, is that I notice you can select at compile time between stepping modes, the asm file shows set to 1/16 and 1/8th, I would have thought initially it would be set to 1/2 or full step?
    I don't use steppers, so I am guessing.
    Another possibility to try which may test if the Pic is running OK is to edit the ASM file and put an 'end' directive just after the ports are set up.
    This would create a short program and set the A & B outputs to a bit pattern you could then test with a meter for 0v or 5v as per the binary pattern they are set to.
    No guarantee, but it may work.
    Alternatively cut and paste just the initial set up leaving out the interrupts etc that duplicates the port settings, compile and run.
    I just noticed Doorknob suggests a similar method.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  5. #25
    Join Date
    Apr 2006
    Posts
    3498
    Quote Originally Posted by doorknob View Post
    Again, just a suggestion that if you can recompile the source code, you should consider putting in (even temporarily) the ability to blink an LED (or otherwise output a signal that can be tested) under control of the firmware, so that you can verify whether the PIC's clock oscillator is running correctly or not.
    Hi Thanks for the reply.. I have MPLab installed but this is my first time converting the ASM to HEX file.. Literally i have zero experience with PIC, although i am good at uploading HEX to PIC(chair)... But don't know how to convert ASM to HEX.. this is why i am asking for help, can you supply me hex so that i can upload to the PIC and check whether the oscillator is running or not???... A simple Blink LED with 1 second interval will be great...
    Quote Originally Posted by doorknob View Post
    One observation, although I wouldn't think it has any bearing on your present problem, is that I notice you can select at compile time between stepping modes, the asm file shows set to 1/16 and 1/8th, I would have thought initially it would be set to 1/2 or full step?
    I don't use steppers, so I am guessing.
    Another possibility to try which may test if the Pic is running OK is to edit the ASM file and put an 'end' directive just after the ports are set up.
    This would create a short program and set the A & B outputs to a bit pattern you could then test with a meter for 0v or 5v as per the binary pattern they are set to.
    No guarantee, but it may work.
    Alternatively cut and paste just the initial set up leaving out the interrupts etc that duplicates the port settings, compile and run.
    I just noticed Doorknob suggests a similar method.
    Al.
    hi Al, thank you for answering me and i am really thankful to both of you keeping with me in this difficult time.. I do know that how difficult the time when you continuously going into haphazard troubleshooting way for the past 10 hours continuously..

    The new PCB have no response to the Stepper at all, even putting my fingers below the PIC solders shows no response..so this is a good condition i think...
    I did a little study on getting the voltages at all the pins of the PIC WHEN:
    1- Only +5V logic supply to the PIC and PCB (No jumpers installed)
    2- Powering up the board with +5V as well as +24V Motor supply (No jumper installed).

    Following picture shows consistent voltage readings for both above conditions.
    This is just for your troubleshooting, as i don't know much about these voltages....
    Attached Thumbnails Attached Thumbnails NO JUMPERS PIC READINGS.jpg  
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  6. #26
    Join Date
    Dec 2003
    Posts
    24216
    As long as you have the ASM listing it is just a question of loading it in to MPLAB and run and compile it, this produces all kinds of files such as the HEX file for the programmer, it also shows an assembled listing and error file among a few.
    There is a tutorial and user manual, the tutorial takes you through the initial steps, using the Wizard may be the easiest at first.
    The fact you have these various voltages shown, it appears that the Program is running?
    If you have the other IC's socketed, try removing them and see if the voltage pattern changes.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  7. #27
    Join Date
    Jan 2010
    Posts
    2141
    Unfortunately all of my PIC development tools are packed away right now, and I don't trust myself tinkering with someone else's code without the ability to test it (and also, I haven't written any PIC asm code for about five years, so I would be a bit rusty). Maybe someone else can do that for you, though.

    But since you have a PIC on a board, and the ability to download a hex file into it, you have everything that you need to follow a beginning PIC programming tutorial. If you could spend just a day or two working on that, you would become comfortable using MPLAB and writing or modifying PIC asm code, and it would open up a whole new world of microcontroller experimentation for you.

  8. #28
    Join Date
    Dec 2003
    Posts
    24216
    I can dig out a LED flasher ASM/HEX if need be, although it was written for a 4mhz internal osc, I could change it to HS Xtal, it would just be faster flashing.
    You would need to remove the other IC to test.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  9. #29
    Join Date
    Apr 2006
    Posts
    3498
    Quote Originally Posted by Al_The_Man View Post
    As long as you have the ASM listing it is just a question of loading it in to MPLAB and run and compile it, this produces all kinds of files such as the HEX file for the programmer, it also shows an assembled listing and error file among a few.


    I can dig out a LED flasher ASM/HEX if need be, although it was written for a 4mhz internal osc, I could change it to HS Xtal, it would just be faster flashing.
    You would need to remove the other IC to test.

    Al.
    Hi Al, I will read the tutorial may be this is good opportunity to learn MPlab... the LED flasher will be great, but keep it blinking at a time period of 1 second and please also tell me at what port/ pin i have to check the voltage output ... this will at-least confirm that my Xtal is running fine with 15Pf capacitors across...

    Quote Originally Posted by doorknob
    Unfortunately all of my PIC development tools are packed away right now, and I don't trust myself tinkering with someone else's code without the ability to test it (and also, I haven't written any PIC asm code for about five years, so I would be a bit rusty). Maybe someone else can do that for you, though.

    But since you have a PIC on a board, and the ability to download a hex file into it, you have everything that you need to follow a beginning PIC programming tutorial. If you could spend just a day or two working on that, you would become comfortable using MPLAB and writing or modifying PIC asm code, and it would open up a whole new world of microcontroller experimentation for you.
    I am a VisualBasic programmer and meanwhile learnt C programming especially i am well at ATMEGA328P programming and having many successful projects.. For AVR programming i am using Arduino and its especially developed language "PROCESSING" thats just resembles with C...

    I can read the ASM no problem and can modify it..but never played with MPLAB before..so i have to play now... but i hate ASM....

    I am attaching the picture of 20MHz xtal i am using, I have sequentially changed from 33PF to 22PF to 15PF across the 20Mhz xtal but i am getting no response from the motor.. I have replaced the motor with other one but still no holding... Keep in consideration that (as per attached figure), i have connected only the coils 1 2 and 3 4 in the same sequence to PICstep and left the COMMON 5 and 6 unconnected.
    Attached Thumbnails Attached Thumbnails 20MHz xtal.jpg   stepper-coils.jpg  
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  10. #30
    Join Date
    Apr 2005
    Posts
    253
    Hi,
    The hex code on Alans site works, I have downloaded and use his hex code. You haven't said if you tried toggling the step input as the motor will NOT hold on power up until it see's step input (assuming enable is already at ground).

    Have you used your programmer to download different hex onto PIC's for different projects and did they work? or is this the first time you have tried to do it?
    I'll get it finished sometime after I start it.....

  11. #31
    Join Date
    Dec 2003
    Posts
    24216
    If you want to try this, I have not tested it on an HS Xtal, but it is essentially the same code with the config changed.
    The RA-0 to RA-3 and RB-0 to RB-3 should switch the outputs on off at low freq.
    Rename it .HEX
    Al.
    Attached Files Attached Files
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  12. #32
    Join Date
    Apr 2006
    Posts
    3498
    Quote Originally Posted by robe_uk View Post
    Hi,
    You haven't said if you tried toggling the step input as the motor will NOT hold on power up until it see's step input (assuming enable is already at ground).
    Many time with zero results.. I touch the +5V wire at Step pin many many time but their was no response from the Motor... I am puzzled why motor not holding torque... Also i have replaced so far 4 PICs considering their might be problem with the PIC but...
    Quote Originally Posted by robe_uk View Post
    Have you used your programmer to download different hex onto PIC's for different projects and did they work? or is this the first time you have tried to do it?
    Yes I have used this programmer with success.. recently i programmed the 18F4550 PIC for "Steve Rotary Indexer", He has posted his HEX file with all the configuration bits and the circuit worked like a charm...
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  13. #33
    Join Date
    Jul 2008
    Posts
    390

    Driver chips, maybe?

    Are you sure that the issue isn't with the driver chips? It sounds like they are either not enabled or they are dead.

    When you killed your first PIC, where the driver chips also on the same board?

    You may want to test one individually.

  14. #34
    Join Date
    Apr 2006
    Posts
    3498
    amish..i have checked all the PICs..they are programmed,verified and read by QL-2006(the pic programmer software).
    Someone told me that if the chip is removed the motor should lock but in this case Nope..nothing happen..i think their is some problem with the Schematic PCB by Alan for the Version 4.
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  15. #35
    Join Date
    Jul 2008
    Posts
    390

    Busy

    I will see if I can help you diagnose the issue step-by-step. I have experience programming AVRs (like PICs) and quite a bit of experience with circuits.

    However, I am very busy both today and tomorrow, so I can't immediately be of assistance. :tired: I will post when I have some more time.

  16. #36
    Join Date
    Apr 2005
    Posts
    253
    Quote Originally Posted by Khalid View Post
    amish..i have checked all the PICs..they are programmed,verified and read by QL-2006(the pic programmer software).
    Someone told me that if the chip is removed the motor should lock but in this case Nope..nothing happen..i think their is some problem with the Schematic PCB by Alan for the Version 4.
    No, v4 pcb works for me.
    I would doubt the motors would hold if there was no PIC.
    I have one more suggestion, when i was originally testing i couldn't get my picstep to run until i tested using a 4.8v battery pack, i had been using a pc power supply for my 5v so when the picstep worked with the battery pack i assumed i have a bad pc psu or that the pc psu interfered with the picstep, so try using a battery pack or 7805 circuit for the 5v rather than the pc switched mode psu.

    Good luck
    I'll get it finished sometime after I start it.....

  17. #37
    Join Date
    Dec 2003
    Posts
    24216
    How did you make out with the test HEX file?
    Any Luck.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  18. #38
    Join Date
    Apr 2006
    Posts
    3498
    Quote Originally Posted by Al_The_Man View Post
    How did you make out with the test HEX file?
    Any Luck.
    Al.
    Today i will test the HEX file. Please confirm have you included all the Configuration bits...
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  19. #39
    Join Date
    Apr 2006
    Posts
    3498
    Quote Originally Posted by robe_uk View Post
    I would doubt the motors would hold if there was no PIC.
    If motor not hold with removed PIC then this is a good symptom ,at-least for me as in my case motor not hold.
    Quote Originally Posted by robe_uk View Post
    I have one more suggestion, when i was originally testing i couldn't get my picstep to run until i tested using a 4.8v battery pack, i had been using a pc power supply for my 5v so when the picstep worked with the battery pack i assumed i have a bad pc psu or that the pc psu interfered with the picstep, so try using a battery pack or 7805 circuit for the 5v rather than the pc switched mode psu.

    Good luck
    I will definitly go to change of Power Supply and shall use LM7809 for input Logic supply to board. I will also try the whole setup with BOB and Mach3. May be due to not attaching the BOB i am getting problem.
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

  20. #40
    Join Date
    Apr 2006
    Posts
    3498
    Quote Originally Posted by amishx64 View Post
    I will see if I can help you diagnose the issue step-by-step. I have experience programming AVRs (like PICs) and quite a bit of experience with circuits.

    However, I am very busy both today and tomorrow, so I can't immediately be of assistance. :tired: I will post when I have some more time.
    I appreciate your help... and i will wait for your posts Amish.:cheers:
    http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
    http://my-diysolarwind.blogspot.com/

Page 2 of 3 123

Similar Threads

  1. Replies: 0
    Last Post: 09-12-2011, 05:11 AM
  2. LB15 shear pin replaced what know ?
    By meadowtech in forum Okuma
    Replies: 5
    Last Post: 06-22-2011, 12:36 AM
  3. Replies: 40
    Last Post: 02-08-2008, 12:03 AM
  4. Can't find C5 and C7 (PicStep component)
    By obscurity in forum CNC Machine Related Electronics
    Replies: 3
    Last Post: 08-04-2006, 08:02 AM
  5. Picstep board voltage question
    By dberndt in forum Stepper Motors / Drives
    Replies: 1
    Last Post: 01-16-2005, 05:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •