Re: [CAD_CAM_EDM_DRO] Parallel port interface for pulse Encoder
Posted by
Jon Elson
on 2007-08-05 17:40:48 UTC
hesham elsayed wrote:
quadrature sequence, maybe that is too slow. The HAL component
that reads encoders by software uses the hardware instruction
inb, I don't know how much overhead there is in your inportb c
function. If you write anything to the screen, it will take
milliseconds to scroll, causing pulses to be missed. Saving to
a file may be faster until the buffer fills.
What pins of the parallel port are you using? If pins 2-9, you
have to set the port to bi-directional, and then set the data
lines to be inputs. When you say it doesn't work, what do you
get? Does it indicate the encoder signals are always high or
low? Does it work at a lower speed, like if you turn the
encoder slowly by hand?
Jon
> Dear john,No, sorry. assuming you have some C code to decipher the
> kindly note that the 2085 pulse per second is the pulse rate that reaches the parallel port finally,(i read it by an oscilloscope)
> and i save it to a file,i use C language under DOS(for faster response as DOS is a single task operating system)
>
> i use inportb to read ,so can you tell me where the problem is?
quadrature sequence, maybe that is too slow. The HAL component
that reads encoders by software uses the hardware instruction
inb, I don't know how much overhead there is in your inportb c
function. If you write anything to the screen, it will take
milliseconds to scroll, causing pulses to be missed. Saving to
a file may be faster until the buffer fills.
What pins of the parallel port are you using? If pins 2-9, you
have to set the port to bi-directional, and then set the data
lines to be inputs. When you say it doesn't work, what do you
get? Does it indicate the encoder signals are always high or
low? Does it work at a lower speed, like if you turn the
encoder slowly by hand?
Jon
Discussion Thread
heshammm2003
2007-08-02 06:51:47 UTC
Parallel port interface for pulse Encoder
Jon Elson
2007-08-02 08:17:56 UTC
Re: [CAD_CAM_EDM_DRO] Parallel port interface for pulse Encoder
hesham elsayed
2007-08-04 23:31:38 UTC
Re: [CAD_CAM_EDM_DRO] Parallel port interface for pulse Encoder
Jon Elson
2007-08-05 17:40:48 UTC
Re: [CAD_CAM_EDM_DRO] Parallel port interface for pulse Encoder