Thank you guys, i mean that. This is deffintly the direction i am trying to take and starting small or slow for this isntance makes the most sense. SO what i think i will do at this point is do like Rich says and just get the pic responding to the program and sending the apropriate commands then go from there. I was going to use Kellycam to control everything but most likely am leaning towards Mach2. I will build a pic877 board then go through the programing before i go any father ahead. I was leaning towards a pic controller board running seperate axis boards. I'll go through the archives here and see what i can put together from other posts. Thank you for the info, as i am still pretty new to pics its nice to see help is avaliable. --- In , "Phil" <phil1960us@y...> wrote: > > good points. especially on starting at a low rate to debug and human > readable debug output. > > I'd suggest a different protocol encoding: with 8 bits, have a 2 bit > "op code" and 3 2 bit axis pairs (one each for x, y and Z). One > opcode would be step and each axis pair would be encoded as step +, > step - and no step. This way, he could get 3 steps per byte, one on > each axis. The other 3 op codes could be used for other axes, relay > control, etc. One should probably be a query operation. > > If you encode the axis pair as a step and direction bit and assign > your output pins in the right way, you can just slap the 6 bits from > the protocol packet right into the output port with no bit twiddling. > Of course you will need to return the step bits to 0 to set up for > the next step pulse. The more you touch the data a) the slower your > code will run and b) the more chance for errors. Speed may not be > important right off the bat but it doesn't hurt to design it in from > the beginning - I prefer to write my code once, not twice. > > Phil > > --- In , "rj_satterlee" <rj_satterlee@y...> wrote: > > > > Hi- > > > > As Phil has already pointed out, you might want to give some thought > > to a "serial format" byte wide serial communication. > > > > I might suggest that you start with RS232 and not get too involved > > with USB just yet. It adds another layer of complexity that might > > prove irritating. > > > > You might want to set up you own control protocol. For example > > have the least significant bit be the axis control, the next > > least significant the direction. Each byte would represent for > > example a certian step in one direction for one axis. The rest > > of the bits you can set up for error checking on the bits in > > question. > > > > As an output, you might want to have the PIC respond to the > > control PC with a status byte when the operation is complete. > > Also you might want to have the limit and home switch settings > > (debounced) in the status word as well. > > > > You will most likely have to pick apart your driver(s) and see > > how they do the control. Most likely, since it's from the parallel > > port, the drivers do most, if not all, of the direction and step > > functions. > > > > I would suggest that you try to implement a fairly fast rs232 link > > AFTER you get it running at a slow speed. Get the thing operational > > then get the speed up, of the link. > > > > For examople a 19.2Kbaud byte can be transmitted in 500ns. Then > > double that for the status returned, and you get about 1000 > > commands/status pairs. That should be fast enough to get you > > running the steppers at pretty much flat out rate. But start > > of testing with a slow link, like 1200 baud or so to get your > > feet wet in serial communications. > > > > In fact, I would suggest setting up a "test case" where you can > > just have the pic output characters, and feed them into a > > hyperterminal link or minicom. There have been many articles on this > > group on how to bring up a serial port. No need to reiterate it > > here. > > > > Best of luck with the project. > > > > Cheers, > > > > Rich S. > > |