Wednesday, April 6, 2011

Bit Skew, Oh How I Dislike Thee

Things have gotten pretty interesting ever since I finished up the basic instruction set of the ORG M1 CPU.  I still enjoy watching the indicator lights on the memory interface that merrily twiddle away when crunching through memory instructions (LOAD and SAVE).

Now that everything is working and I've done programs as large as 13 instructions by setting bitlines in the CPU itself that emulate reading a program out of memory, it's time to load larger programs into the system's non-volatile storage.  To facilitate this, I chose to add an RS-232 serial port to the system and load programs straight from my PC.  That's where I'm currently getting hung up.

It seems that I'm registering bits improperly no matter what I do.  I can't seem to figure this one out (yet).  I've managed to get the system to clock in data correctly at about 300 baud, but there's no reason why 115.2 Kbps shouldn't work too.  The UART I'm using (Sipex SP3232ECP) is capable of a quarter megabit per second when using one channel, and the card in my PC is supposedly good for 1 Mbps or better.

I've done many sorts of diagnostics counting bit transitions and such but to no avail.  In that past I've used this same transceiver to send data at 115.2 Kbps just fine.  I'm as yet unsure why RX is being such a bitch.

No comments:

Post a Comment