Quote Originally Posted by dw_picbasic View Post
Hi gang,
I have a project to talk to a device at 56700,N,8,1,CTS,RTS

I do not have PB-Pro and don't have the money for the upgrade as of yet.

All I need to do for sending data into the device is to send a bit stream of 3Fh, followed by 41h.
This initiates a query to the device which responds with 4 hex bytes.

I think I can simulate the 3Fh + 41h bit-stream using a 4Mhz crystal/resonator.
But then how do I capture the returned data?
I'm not sure if a pic running at 4Meg is going to be processing fast enough to decode 4 bytes at 56700 baud.

I only have to query the device every few seconds.

Perhaps I could use a chip that which would capture and store the 4 bytes and then have the PIC pull them off and reset the chip for the next send?

Perhaps you already have a sample "PicBasic" code that can work at 56700 baud?

Yes, I know, I should bite the bullet and get upgrade to Pro, but for now the piggy bank is empty.

Your suggestions greatly appreciated!!
Thanks,
dw_picbasic
Think about this:
In your program, you define the osc for 4 mhz and write the program for 9600 baud in your serial routines. BUT...
In reality, you clock the PIC at 24mhz. The compiler think it's running at 4mhz and sets all of it's delay loops according to that, BUT...you're running 6 times faster. 9600 baud @ 4mhz = 57600 baud @ 24mhz.

I don't have the PBC manual on hand at the moment, I don't remember which commands PBP supports which PBC doesn't support.
In the end, you could always use the hardware UART and peek/poke commands.

And it would help to know which PIC you're using...