Maybe run the latency test on EMC2 and then run the conf wizard to see what your target PC will need/do exactly.
I am only running one parallel port on a 1.3 GHz machine with 758 MB ram. Two ports may make a difference.
Those be my thoughts.
Maybe run the latency test on EMC2 and then run the conf wizard to see what your target PC will need/do exactly.
I am only running one parallel port on a 1.3 GHz machine with 758 MB ram. Two ports may make a difference.
Those be my thoughts.
Dave
Always wear safety glasses while programming.
I am blessed with 4 8-bit timers to go with my 16 bit timer. along with some DT_INT, I should be able to make this work just wonderful!!
And that is a great idea Dave, I never really considered running 2 ports may slow things down a bit.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
So far I have a main that just moves porta to latc on every iteration. It also checks that enable is high. If enable is low, it gosubs to disable drives, and waits there for a high again on the enable line. At which point it returns to the main to keeep passing values from porta to latc.
Also have a DT_INT every 5 mS. this does nothing but inc a counter used to flash a LED every .5 sec. That is also handled in the main. If count=100 then toggle LED
This all works
Now its time to step up the function here. I want to move the port passing to the int. But I am having a brain fart about the timming. The pulses last for 10uS high and 10uS low. I am thinking a 5uS interupt will ensure I NEVER miss a pulse, but my mind is cloudy on this. My int will be ASM, so no PBP context saving for entry and exit. I want to do this so I can do more stuff and never worry about missing a step.
Does this seem right?
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Don't I need to do that on a port with IOC? Port B seems to be my IOC port, but since B has ICSP pins, I left them dedicated to ICSP. I need all 8 pins for my control.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Hey Bert,
I am trying to understand this better. Would you mind generalizing what it is your board is going to be doing? I take it that it is passing all of the data from porta to portc. But beyond that, I am in the dark. I guess your EMC2 program is sending stepper motor signals through the parallel port, to your board. Then your board is passing it to the stepper if it is enabled. Couldn't you just avoid passing it from one port to another, and act directly on the parallel port pins, or am I missing something?
http://www.scalerobotics.com
Walter you are exactly right. I could have just passed the signals to the drives. In fact I thought about doing just that. But heres the thinking:
This will be a project to be done in several phases.
phase 1:
pass motor signals to the drives
watch limits and disable drives if hit
report to EMC a problem has occured
LED indicators for drive status (enabled or disabled)
phase 1 will give me basic functions of my machine while playing with future phases.
phase2:
add in serial comm and set some parameters such as drive current, switch offsets, and any others I can think of. My machine has mill and hotwire capabilities all built in, I am sure There will be different "Zeros" for each. I am not sure EMC can handle that. So I may have to have my board maintain an offset and get a signal from EMC to tell it which mode its in. That way The board could adjust the axis when "tool change" occurs. for this I will need to talk to the steppers.
Until Phase 2 is complete, the offset stuff will be handled in the machine program.
phase3:
Turn the card into a full controller, being able to download a G-code program to it and hit go, elimiting the need for EMC at all.
This will be a big deal and prolly take a good while.
Happy to answer any more questions, just ask.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Bookmarks