6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 6:07 pm

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Oct 10, 2023 2:14 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
I wanted to get more done on my mini BASIC interpreter before getting sidetracked by this idea, but I had to at least get the design spec out of my head first. Given the problems with the W65c51 series, and the general uselessness of the IC recycling market for reliably finding the right vintage version, there's a need for an ACIA design that actually works. Something that's easier for a novice to interface to than the MAX3100, less complex to drive than the 8530 or the 28L92, and significantly more capable than the 6850.

One option along these lines is to re-implement the 6551 in a CPLD or two. I think this might be just possible in a 72-macrocell part, and should be easy in 128 macrocells. Maybe someone wants to take on that project, but I then started looking at how some of the historic misfeatures of the 6551 could be designed out, and realised that the best way to achieve that was a replacement design, not a re-implementation. Hence the "6552".

For the moment, I'll just tease some tables and example code from my design spec:
Code:
    +--------------------+---------+--------------------+
    |      **READ**      | Address |     **WRITE**      |
     +--------------------+---------+--------------------+
     | Receive Data       |    0    | Transmit Data      |
    +--------------------+---------+--------------------+
    | Status Flags       |    1    | Control Register   |
    +--------------------+---------+--------------------+
    | Receiver State     |    2    | Receiver Config    |
    +--------------------+---------+--------------------+
    | Transmitter State  |    3    | Transmitter Config |
    +--------------------+---------+--------------------+

      7     6     5     4     3     2     1     0
   +-----+-----+-----+-----+-----+-----+-----+-----+
   | Rx  | Tx  | Rx Parity | Tx Parity | Tx  | Tx  |   Control
   | INTERRUPT |   Mode    |   Mode    | BRK | 9th |
   +-----+-----+-----+-----+-----+-----+-----+-----+
   | Rx  | Tx  | Rx  | Tx  | DSR |Modem|Frame| Rx  |   Status
   | Available |OvrRn|Empty|   Status  |Error| Pty |
   +-----+-----+-----+-----+-----+-----+-----+-----+
   | RTS | Byte Size | Baud Rate Select            |   Receiver Config
   +-----+-----+-----+-----+-----+-----+-----+-----+
   | CTS | Byte Size | Baud Rate Select            |   Transmitter Config
   +-----+-----+-----+-----+-----+-----+-----+-----+

   +-----------+---------+---------+--------+--------+--------+------------+
   | Baud Rate | Divisor | Divisor | 1.8432 | 2.4576 | 3.6864 | MIDI XTAL  |
   | Selector  |  to x16 | overall |  MHz   |  MHz   |  MHz   | 31520 baud |
   +-----------+---------+---------+--------+--------+--------+------------+
   |  0  00000 |       1 |      16 | 115200 | 153600 | 230400 |     0.5000 |
   |  1  00001 |       2 |      32 |  57600 |  76800 | 115200 |     1.0000 |
   |  2  00010 |       3 |      48 |  38400 |  51200 |  76800 |     1.5000 |
   |  3  00011 |       4 |      64 |  28800 |  38400 |  57600 |     2.0000 |
   |  4  00100 |       6 |      96 |  19200 |  25600 |  38400 |     3.0000 |
   |  5  00101 |       8 |     128 |  14400 |  19200 |  28800 |     4.0000 |
   |  6  00110 |      12 |     192 |   9600 |  12800 |  19200 |     6.0000 |
   |  7  00111 |      16 |     256 |   7200 |   9600 |  14400 |     8.0000 |
   |  8  01000 |      24 |     384 |   4800 |   6400 |   9600 |    12.0000 |
   |  9  01001 |      32 |     512 |   3600 |   4800 |   7200 |    16.0000 |
   | 10  01010 |      48 |     768 |   2400 |   3200 |   4800 |    24.0000 |
   | 11  01011 |      64 |    1024 |   1800 |   2400 |   3600 |    32.0000 |
   | 12  01100 |      96 |    1536 |   1200 |   1600 |   2400 |    48.0000 |
   | 13  01101 |     128 |    2048 | 900    |   1200 |   1800 |            |
   | 14  01110 |     192 |    3072 | 600    | 800    |   1200 |            |
   | 15  01111 |     256 |    4096 | 450    | 600    | 900    |            |
   | 16  10000 |     384 |    6144 | 300    | 400    | 600    |            |
   | 17  10001 |     512 |    8192 |        | 300    | 450    |            |
   | 18  10010 |     576 |    9216 | 200    |        | 400    |            |
   | 19  10011 |     768 |   12288 | 150    | 200    | 300    |            |
   | 20  10100 |     856 |   13696 | 134.58 |        |        |            |
   | 21  10101 |    1047 |   16752 | 110.03 |        |        |            |
   | 22  10110 |    1142 |   18272 |        | 134.5  |        |            |
   | 23  10111 |    1396 |   22336 |        | 110.03 |        |            |
   | 24  11000 |    1536 |   24576 |  75    | 100    | 150    |            |
   | 25  11001 |    1713 |   27408 |        |        | 134.5  |            |
   | 26  11010 |    2048 |   32768 |        |  75    |        |            |
   | 27  11011 |    2095 |   33520 |  54.99 |        | 109.98 |            |
   | 28  11100 |    2304 |   36864 |  50    |        | 100    |            |
   | 29  11101 |    2534 |   40544 |  45.46 |        |        |            |
   | 30  11110 |    3072 |   49152 |        |  50    |  75    |            |
   | 31  11111 |    3379 |   54064 |        |  45.46 |        |            |
   +-----------+---------+---------+--------+--------+--------+------------+

   +--------------------+-------------+
   | Byte Size Selector | Bits / Word |
   +--------------------+-------------+
   |                 00 |      5      |
   |                 01 |      6      |
   |                 10 |      7      |
   |                 11 |      8      |
   +--------------------+-------------+

   +-------+------------------------------------------------------------------------------------------------------------+
   | Value | Mode                                                                                                       |
   +-------+------------------------------------------------------------------------------------------------------------+
   |   00  | No parity.                                                                                                 |
   |       | The Stop bit directly follows the most-significant bit, on both Tx and Rx.                                 |
   +-------+------------------------------------------------------------------------------------------------------------+
   |   01  | Fixed parity.                                                                                              |
   |       | On Tx, the contents of the "Tx 9th" bit is inserted between the MSB and the Stop bit.                      |
   |       | On Rx, the contents of the corresponding bit is indicated by the "Rx Pty" flag in the Status register.     |
   +-------+------------------------------------------------------------------------------------------------------------+
   |   10  | Even parity.                                                                                               |
   |       | On Tx, the parity bit is sent so as to make the count of set bits even.                                    |
   |       | On Rx, the "Rx Pty" flag is set for bytes where the count of set bits was odd, indicating a parity error.  |
   +-------+------------------------------------------------------------------------------------------------------------+
   |   11  | Odd parity.                                                                                                |
   |       | On Tx, the parity bit is sent so as to make the count of set bits odd.                                     |
   |       | On Rx, the "Rx Pty" flag is set for bytes where the count of set bits was even, indicating a parity error. |
   +-------+------------------------------------------------------------------------------------------------------------+

   ACIA_Init:
      LDA #$E6
      STA ACIA_RxConfig   ; 9600 baud, 8 bits, RTS flow control
      STA ACIA_TxConfig   ; 9600 baud, 8 bits, CTS flow control
      STZ ACIA_Control   ; no parity, no interrupts, no break condition
      RTS

   ACIA_Put:
      BIT ACIA_Status      ; V flag reflects bit 6 (TxAvail)
      BVC ACIA_Put      ; wait for it to be set
      STA ACIA_Buffer      ; send our data
      RTS

   ACIA_Get:
      BIT ACIA_Status      ; N flag reflects bit 7 (RxAvail)
      BPL ACIA_Get      ; wait for it to be set
      LDA ACIA_Buffer      ; receive our data
      RTS


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 10, 2023 3:58 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
It'd be good to pick another number, because the '52 was a dual '51 made by at least Rockwell, and it's in my '87 Rockwell data book.  See http://6502.org/documents/datasheets/ro ... _dacia.pdf

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 10, 2023 4:30 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Ah, I thought I'd checked for that sort of thing, but evidently I missed one of the usual suspects. I'll get around to a find and replace at some point.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 10, 2023 4:44 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1121
Location: Albuquerque NM USA
I have emulated the essential part of 6850 ACIA in CPLD (128 macrocell EPM7128S). However, the ACIA emulation has different mindset; it only has sufficient logic to "fool" an application software (Z80 RomWBW, specifically) to treat it as a real 6850. Most programmable functions of ACIA are removed; it is fixed 115200 N81 without error checking flags and does not require initialization. My thought process is that CPLD is a glue logic that does many things so I want this glue logic to accomplish as many functions as possible instead of emulating one particular function completely. CPLD is programmable so it is easy to add or subtract functionalities to accommodate other functions in the same CPLD. The advantage of ACIA in CPLD is it can run very fast, much faster than the real 6850, furthermore, the registers and status/command are fully accessible so serial bootstrap is easy to do. The overclocked 36MHz 6502 has a zero-wait partially implemented ACIA inside its CPLD along with memory decode, CF disk decode and a small boot ROM to support either serial bootstrap or CF bootstrap.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 10, 2023 7:10 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
A few notes on the design philosophy, then:

Obviously if you're programming your own CPLD, it's easy to implement just precisely what you need for your immediate application. But this is supposed to be a discrete and complete building block, which could theoretically be made into an ASIC to actually replace the 6551 at some point, and meanwhile can be recommended to novice SBC builders as a way to get a serial port with minimal fuss. It should require exactly the same amount of external hardware as the 6551, ie. a chip-select, a canned UART-frequency oscillator or crystal, and a voltage translator to/from RS-232 levels - not counting incidental requirements of the CPLD itself. So like the 65SPI, it could be provided as a complete, pre-programmed unit for hobbyists to plug in and just use.

And like the 6551, it has the flexibility to be used for a wide variety of applications, from interfacing with legacy electromechanical terminals to rapidly loading software from a host computer. The baud rate table thus includes suitable divisors for 134.5, 110, 75, 50, and 45.45 baud (or sufficiently close approximations thereof) for two of the most commonly recommended "UART crystals", and for three of those rates also for a third common option, as well as supporting basically all the speeds likely to be handled by newer hardware. An enhancement over the 6551 is the provision of independent baud rate generators (and format control) for transmit and receive; the 6551 could use different speeds for each direction, but required the receive clock to be provided by an external generator in that case. So if you want to recreate the BBS experience with 1200/75 baud transmissions… that would become easier.

Also provided for is proper hardware RTS/CTS flow control, support for which can be toggled in software. RTS control is toggled between legacy half-duplex ("I want to send, listen to me") and modern full-duplex ("I am ready to receive") paradigms. CTS support is simply toggled between respecting and ignoring it. When read back, these bits reflect the actual state of the lines, rather than the configured behaviour. The 6551 only operates in "legacy RTS, respect CTS" mode, which is not so useful in the modern era.

I'm particularly pleased by the parity control method. This actually provides three features in one place: normal parity (even or odd), 9-bit operation, or an extra Stop bit. I don't think anyone will really mind that these are mutually exclusive. Speaking of Stop bits, an extra half Stop bit is implicitly selected by a 5 or 6 bit word size in the transmitter; this is important for electromechanical receivers which are the most likely to use those word sizes (particularly the Selectric based terminals which would reportedly burn out a clutch if not operated at the correct speed, hence the decidedly weird 134.5 baud rate designed specifically for them). Compare that to the mess of a configuration space around these functions in most other serial interfaces.

I also carefully arranged the register bits so that the Rx/Tx Available flags can be tested conveniently and non-destructively using the BIT instruction (ie. they are in bits 7 and 6 respectively, and thus directly set the N and V flags in the 6502 which are easy to branch on), and there is a direct logical correspondence between some of the overlapping fields in the Control and Status registers. This should reduce the cognitive load of learning to use them, and may possibly also simplify software handling.

There is no provision for DMA, since it's rare for it to be added to a homebrew system and the performance requirements do not make it an essential feature. Instead, I've carefully considered how interrupt-mode operation would work, since the 6502 has good interrupt performance. Interrupt sources are grouped into two categories (Tx related versus Rx related) and masked accordingly. Unmasked interrupts are internally edge-triggered, with a flag hidden from register space driving the /IRQ line; this flag is reset when the Status register is read, on the grounds that this shows that the CPU has responded to the interrupt and is now aware of the triggering condition.

Finally, you might notice a "Tx Empty" flag in the Status register. This indicates when both the Tx buffer and shift register are empty, and the transmitter has therefore gone idle - and it is an interrupt source in addition to the "Tx Available" flag. Imagine how much easier it would have been to work around the W65c51 bug if this was available - but it also has other applications, such as correctly synchronising half-duplex turnarounds or baud rate changes. This would also make it easier to build an extended version of the device with multi-entry FIFOs, without worrying too much about timing compatibilities. Note that in "legacy" mode, the RTS output essentially mirrors the "Tx Empty" flag.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 11, 2023 12:14 am 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
Chromatix wrote:
Unmasked interrupts are internally edge-triggered, with a flag hidden from register space driving the /IRQ line; this flag is reset when the Status register is read, on the grounds that this shows that the CPU has responded to the interrupt and is now aware of the triggering condition.

In my recent serial systems I used to do this too, but I found it awkward in code because any BIT of the status register clears the interrupt and now I have to deal with potentially two different interrupt causes one after the other based only on the two flags. If transmit and receive are both pending and I only service one of them then I will have lost the chance to respond in an interrupt context to the other one.

You can reread the status in between, e.g. checking for transmit data register empty first and handing that and then retesting the status register before handling any pending receive data register full case. But at that point where you reread it, you might miss another TDRE that has become pending, and then you won't even get an interrupt after your RTI.

Another issue was that non-ISR code reading the status register could have unintended consequences on interrupts. Basically any code that read the status register needed to be prepared to immediately run an interrupt housekeeping function afterward... ick.

A prime case here was the code to add a character to the transmit buffer. If the TDRE is empty then this code needs to directly send the character rather than buffering it - it can't just put it in the buffer and wait for the ISR because, without any character currently being sent, the ISR won't trigger. So this code needs to SEI and read the status register, to determine whether it can and must send the character directly. But now since it reads the status register it stands a chance of actually suppressing a *receive* interrupt... So now this code needs to chain to handle any pending receives, which is really nasty.

So it ended up requiring some subtlety in code that felt easy to get wrong. I switched to requiring a write operation to clear the IRQ state, so that it was more explicit in code. This meant at least that the buffer code could check for TDRE without any side effects, which was much more comfortable!

Really though I started second-guessing why I was allowing the system to drop the IRQ if its cause hadn't been dealt with, the main reason being to allow the CPU to leave the transmit circuit idle if no data is pending transmission. I came to the conclusion that 6522-style IER flags (which I think you're including) were a better model for this - so that for example if you have no data to send then you should just disable the TDRE interrupt, rather than having the hardware let you clear the IRQ state through a status register side effect without actually either dealing with its cause or disabling the interrupt.

In this final scheme the buffer code just adds the character to the buffer and sets the TDRE interrupt enable flag. If the circuit is already idle then an IRQ will happen immediately, consuming the character; otherwise it will happen when the circuit does go idle. There are some race conditions but in the worst case I think there's an extra entry to the ISR with nothing for it to actually do, which is mostly harmless and unlikely.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 11, 2023 4:21 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
On consideration of the above, it seems to me that simply making the "Rx Available" condition a level-sensitive rather than edge-sensitive IRQ source would be sufficient to avoid at least the case you describe, and it's difficult to see how other such cases would reasonably arise. This avoids having to rewrite the Control register with different states of the interrupt masks, for example - which could complicate using the Control register for other things like 9-bit transmission.

Incidentally, in most cases stuffing data into the Tx Buffer would result in an interrupt being triggered shortly thereafter, provided the Tx interrupt mask was set. That's because a "Tx Available" condition would activate when the buffer was transferred to the shift register, and furthermore a "Tx Empty" condition may also occur shortly after that. Notably, the 6502 also provides a mechanism to simulate an interrupt if necessary - or you could simply call the receive-to-buffer subroutine directly, if the status flags suggest it to be necessary. I don't think these are particularly difficult conditions to handle.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 11, 2023 5:39 am 
Offline
User avatar

Joined: Sun Dec 29, 2002 8:56 pm
Posts: 460
Location: Canada
Hi Chromatix, I am a fan of the 6551, a couple of suggestions:

1) Have an option for arbitrary clock division. This takes 2 or 3 regs for the divisor. Many small systems do not have clocks available. There may be only a 2 MHz master clock for the system, and the baud rate needs to be set against that.
2) Reserve a couple of registers for Tx, Rx fifo control.
3) Make the stop bits independent of the number of data bits. 1/1.5/2
4) It might be nice to have more byte sizes available, eg 4 to 12.
5) 6551 register compatibility would allow existing software to be ported more easily

I have a uart6551 project in https://github.com/robfinch/cores/tree/master/uart6551/trunk which is 6551 similar. It has been implemented in a FPGA though so may not fit into a CPLD.

_________________
http://www.finitron.ca


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 11, 2023 11:25 am 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
Chromatix wrote:
On consideration of the above, it seems to me that simply making the "Rx Available" condition a level-sensitive rather than edge-sensitive IRQ source would be sufficient to avoid at least the case you describe, and it's difficult to see how other such cases would reasonably arise.

You're right, that is actually how my discrete circuit worked so perhaps I worried about this more than necessary - it would only apply for transmits, and handling those second in the ISR removes any issues. The add-to-buffer routine can disable interrupts, check if the buffer is empty, check for TDRE, and based on the result either send the character to the hardware or put it in the buffer.

So long as it is trivial to write simple unbuffered code and reasonably possible to write reliable interrupt-driven buffered code, the important cases are covered.

Quote:
This avoids having to rewrite the Control register with different states of the interrupt masks, for example - which could complicate using the Control register for other things like 9-bit transmission.

Yes, unless you have a 6522-like interface that allows individual bits to be changed. If there are cases where the user might need to often change a single bit then that could be worthwhile.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 11, 2023 3:23 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Quote:
1) Have an option for arbitrary clock division. This takes 2 or 3 regs for the divisor. Many small systems do not have clocks available. There may be only a 2 MHz master clock for the system, and the baud rate needs to be set against that.
2) Reserve a couple of registers for Tx, Rx fifo control.
3) Make the stop bits independent of the number of data bits. 1/1.5/2
4) It might be nice to have more byte sizes available, eg 4 to 12.
5) 6551 register compatibility would allow existing software to be ported more easily

I did consider including the ability to set an arbitrary divisor, rather than selecting from a table. However, this actually makes it more difficult to select standard baud rates which users are more likely to find useful, particularly if they're interfacing to a PC which will be operating with one of the standard UART crystals. Providing a separate oscillator for the UART is a matter of an inexpensive, DIP-8 sized can, or for a slightly more compact solution a discrete crystal and three surface-mount passives. If a separate oscillator isn't feasible, then you could use the UART oscillator as the master clock for the system, rather than the other way around.

By way of example, the nearest divisor from 2MHz for 9600 baud is 16x13. This yields an error of 0.16%, which is acceptable. But 13 is a prime, so none of the higher standard speeds could be divided from a 2MHz source, unless the internal sampling clock was changed from 16x (which is used, for example, to eliminate false start bits and accurately align samples to the middle of bit periods).

One goal here was to use the same number of address slots as the 6551, so that a pin-compatible carrier board with essentially full functionality could be constructed. This would yield a drop-in replacement (in hardware terms) for which modifying the driver software is straightforward. Adding three of the features you mention would make it virtually impossible to achieve that goal - and the final feature effectively makes that goal mandatory. Design is a tradeoff, and I'm not here to build a Rolls-Royce. If you want one of those in UART form, use a 28L92.

I'll say more about stop bits, though. It's important to realise that on the wire, a stop bit uses the same level as line idle - so the receiver doesn't care whether it's intended as a stop bit or is a meaningless gap between characters. Stop bits are therefore mostly about meeting exotic timing constraints, usually in the receiver. These constraints almost always relate to electromechanical equipment, eg. 5-bit Baudot TTYs and 6-bit Selectrics. The Selectric is an instructive special case, as the serial interface to turn a Selectric into a printing terminal was very much an ex-post-facto modification, and the word format and baud rate were carefully tuned to avoid burning out a mechanical clutch which would start and stop the mechanism.

So for transmit, my design allows for 1.5 stop bits (permanently) for 5 and 6 bit words, and the more usual 1 stop bit for 7 and 8 bit words. These can be extended by one full bit in the transmitter by configuring "fixed parity" with the "mark" polarity (setting the "9th bit" to 1), so 2.5 bits can be selected for the smaller words, and 2 bits can be selected for the larger words. For the receiver, the extra half or full stop bit is accepted but not checked for; if "fixed parity" is selected, the first stop bit will be recorded in the "9th bit" flag, and the second one will be treated as the "real" stop bit.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 11, 2023 4:31 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
I think it should be possible, using circuitry clocked on both edges, to divide by 6.5?

And the 16x sampling could perhaps be relaxed to 8x or 4x? (I think I'm right in saying that, for example, when sampling at 4x, the 2nd and 3rd samples are on average the closest to the centre of the bit cell, as on average you catch the start bit edge half a sample period late. If both agree, that's a good sample.)

Not that I'd be able to design anything like this myself, of course.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 11, 2023 5:22 pm 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
BigEd wrote:
And the 16x sampling could perhaps be relaxed to 8x or 4x? (I think I'm right in saying that, for example, when sampling at 4x, the 2nd and 3rd samples are on average the closest to the centre of the bit cell, as on average you catch the start bit edge half a sample period late. If both agree, that's a good sample.)

Remember that you need to pick one or the other, and especially consider the worst case. E.g. take the second sample. So your worst case is when your first sample fell right at the start of the start bit, and you're sampling about 25% through each bit. Now I think your margin for clock drift (in one direction) is only 2.5% over the course of a 10-bit 8-N-1 byte, which is pretty little margin. So 4x isn't great!

(Edit - I suppose you could use the 1st, 2nd and 3rd samples together, and if they differ then use the value of the 2nd one but offset your samples for the next bit one way or the other to resynchronise... I expect its been done this way for decades in practice!)


Last edited by gfoot on Wed Oct 11, 2023 5:28 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 11, 2023 5:24 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Might be worth a try... clocks at both ends are probably from crystals with pretty good accuracy. But yes, probably taking the later of the two samples is safest. (I was thinking, if taking two samples, a mismatch could be signalled as a framing error.)

Edit; Thinking about it, the sampling could use both edges too.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 11, 2023 5:34 pm 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
Yes sorry, I edited while you were replying - I'd also misread the bit about using both samples together! The trouble is bytes like zero and $80 still don't provide much opportunity to resynchronise midway so would easily be misread.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 11, 2023 5:38 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
I wasn't so much worried about resyncing, but about how to best make use of two equally-valuable samples. If it were three samples, one might take a majority vote... or some other function of three bits which rejects missampling.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: