Maker Pro
Maker Pro

buffered serial input (pic 16f628)

Q

Quack

Jan 1, 1970
0
Hi,

I want to be able to buffer a short stream of serial data in my
circuit (maybe 10 bytes maximum or less).

Basically i want to receive serial communications, at *any* time - no
flow control - and i want to 'get' these bytes in the main process
when i want them from somewhere.

I dont have easy access to parts - so im hoping this can be
accomplished with perhaps a 16f628 pic, programmed to be some kind of
buffer.
Any suggestions on doing that ?

Secondly, if i was to order specific parts for this - what should i
get.
so i want non-flow control serial input (slow) to enter some kind of
'buffer chip' - and then i want to be able to pull those bytes out the
other end of the 'buffer chip' when i feel like it from a seperate
mcu..
whats the best chip for this ? i hear people using loads of max232
chips all over the place - do these just generate the correct voltage
levels etc or are they buffers also ?

Thanks again! :)

Alex.
 
C

Costas Vlachos

Jan 1, 1970
0
Quack said:
I want to be able to buffer a short stream of serial data in my
circuit (maybe 10 bytes maximum or less).

Basically i want to receive serial communications, at *any* time - no
flow control - and i want to 'get' these bytes in the main process
when i want them from somewhere.

I dont have easy access to parts - so im hoping this can be
accomplished with perhaps a 16f628 pic, programmed to be some kind of
buffer.
Any suggestions on doing that ?

Secondly, if i was to order specific parts for this - what should i
get.
so i want non-flow control serial input (slow) to enter some kind of
'buffer chip' - and then i want to be able to pull those bytes out the
other end of the 'buffer chip' when i feel like it from a seperate
mcu..

What you want can be accomplished with the PIC16F628 quite easily. Set up
the hardware USART to asynchronous serial communications, choose the bps
speed you want for the input, then write a simple code that captures the
stream and stores the incoming bytes in the PIC's RAM. Set the USART to
generate an interrupt when there are incoming serial data and use an
intererupt service routine for the storage. This ISR will only steal small
microsecond busts of the total CPU time. You can then clock the data out
asynchronously with repect to the input (practically at any time you want),
either in parallel (using the entire PORTB) or serially in a software-based
SPI-type interface. You'll need a clock signal to initiate the data out,
where the F628 will be the slave, waiting for the external device to request
the buffered data. To keep everything neat and tidy you could also use a pin
to generate a "buffer full" signal once you reach the maximum number of
bytes.

whats the best chip for this ? i hear people using loads of max232
chips all over the place - do these just generate the correct voltage
levels etc or are they buffers also ?

No, they're not buffers in the sense described above. They just generate and
recognise the correct voltages.

Thanks again! :)

Alex.

NP. Have fun.

Costas
_________________________________________________
Costas Vlachos Email: [email protected]
SPAM-TRAPPED: Please remove "-X-" before replying
 
Top