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....
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.
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/
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.
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.
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... 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...
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....
http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
http://my-diysolarwind.blogspot.com/
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.
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 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.
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...
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...Originally Posted by doorknob
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.
http://free3dscans.blogspot.com/ http://my-woodcarving.blogspot.com/
http://my-diysolarwind.blogspot.com/
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.....
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.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
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...
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/
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.
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/
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. I will post when I have some more time.
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.....
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.
If motor not hold with removed PIC then this is a good symptom ,at-least for me as in my case motor not hold.
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/