I never attached a scope on 297 output .. but I imagine if you clock it manually and look at output step by step ... 297 don't do micro stepping so the signal should be clear .. might be easier to debug the output if you use full step and not half step settings.
you can use a 3pin switch to clock manually outter pins to vcc and gnd, middle pin to clock pin on 297
I got my scope out and put it on the output pins of the L297. The outputs all go HIGH and LOW. I have a 2 channel scope, but can't locate my other probe..... so I can't see how the outputs look side by side.
They outputs don't look too clean. I was kind of puzzled by this, but then realized I am using a 5v wall wart for my 5v supply. It holds right at 5 volts with a small load, and I have powered PICs with it with no trouble. I put the scope on that and I have a crummy sawtooth wave. That can't be helping anything.
I'll have to take some time and redo it with a 7805 or atleast add a good filter capacitor to the wallwart to rule that out as a problem. I am too tired tonight.
one hint, while debugging, be sure not to use same power line for pic and for motor (pin4 on 298) ... when you are sure it all works, then if needed to power them from same line add filters etc .. but initially - be sure to split them, might save you few nights.
also, if you are clocking manually you can check output one by one, do not check only A/B check also the enable pin.
The L297 is connected as arhi outlined. I have tried -
FULL and HALF step
CW and CCW
CONTROL both HIGH and LOW.
Power is now supplied by a 7805 run off a 9v battery.
CLOCK is supplied by a 555 running very slow.
I found my other probe so I can look at 2 outputs at once. They all follow the 555. It dosn't matter how I connect the probes. The trace in the picture below is what I get.
Picture number 2 is one output against the 555 output. I don't know why my 555 has such a strange wave. I have 100µf cap on it. Bigger then is normally used I think. Maybe thats why
I am a novice with my scope, but it dosn't look to me like the 297 output travels the full 0-5v.
I did order 2 of these chips. I tried both and they do the same thing.
I didn't know this was going to be a week long project.
If you are powering the full system, ie PIC, LM297 and the motor from a 9Vbty,
its most likely that the 9V PP3 isnt up to supplying the current required.
You require a psu for the LM297/motor than can supply at least 2A to 3A at the required motor voltage.
Keep the PIC powered from the 9Vbty and 7805 while testing.
I don't recall, but I tried all the outputs and could't get a change.
Eric, right now all the 9v is powering is a 555 timer, small led to give me a visual indicator the 555 is running and the L297. I back off with the 298 and the actual motor until I can be pretty sure I have the 297 working.
I will try that tonight. I kind of doubt its the chip, so it must be some dumb mistake I am making. This sure is proving alot harder then it looked.
I guess the only bright side is you don't get a chance to learn much when things just "work" on the first try.
I had a few minutes before I left for work thismorning, and I connected a 12v 3 amp power supply to the 7805. The 555 still has the goofy wave to it. I wouldn't think that would be the problem, but it sure has me wondering.....
I think that the 7805 needs capacitors. Otherwise it act strangely.
I would have a question. In the datasheet of the L298, page 8 they suggest to use 2A fast diodes types. What would be the least expensive diode for that purpose?
I had small ceramic caps on the 7805, but didn't have anything else for capacitors on the power supply.
After spending an hour trying every conceveable combination of the CONTROL/INH1/INH2 to get a output like arhi's simulation I grabbed this big ole' 10000 uF cap that was rolling around on my bench and stuck it across the power rails. Ta da. Output now looks like arhi's simulation.
live and learn I guess. Working on hooking the L298 back up now.....