Proxy wrote:
maurice6502 wrote:
CS0 signal is active low to select base address for device access, pins 13-14 (BA0 - BA1) are used to select 4 "pseudo" registers; BA2 at pin 2 is a further addressing to allocate more 4 bytes for polling flags
check the
datasheet again, the 65C51, similar to the 65C22, has 2 chip selects: CS0 (pin 2) is active high while CS1 (pin 3) is active low. so the chip is only "selected" when both CS0 is high and CS1 is low.
but on your board only CS1 (pin 3, renamed to CS0) is being checked while the original CS0 (pin 2, renamed to BA2) is repurposed as an address line, which can and likely will cause issues in existing systems.
so overall it's not actually 65C51 pin compatible.
You are right, but this expedient only affect base address of device; BA2 is CPU buffered Address 2(weight 4) , this move base address (selected with CS0 that come from one external HC138) at +4 . This involve that base address should be moved +4 but 6502 code must anyway be modified and code recompiled..
This device is hardware compatible, not software..
maurice6502 wrote:
R/W lines is not mandatory, bus contention is not possible because both latch U1 and U3 are adressed throug U4 ; trying to write to read only address (U1 device) dont crash anything
Proxy wrote:
how does that work though? if BA0-2 is set to 001, CS0 is pulled low, and BO2 (PHI2) is pulled high, then U4's Y1 output (PB1_RXREG) is pulled low, causing U1 to pass it's incoming data onto the CPU's data bus. but if the CPU is currently writing as well, then you have potentially colliding data on the bus (which doesn't necessarily crash, but should still be avoided).
at what point in the circuit is that being prevented without checking the CPU's R/W pin?
This device expose only two 8 bit latch, U3 is write only for 6502 , U1 is read only; all operations on 6502 bus are under complete control of 6502
I ask: how is possible to make two concurrent operations with 6502?
If 6502 read U1 no other device contend bus; if software want to write on U1 should be corrected and U3 latch have only inputs on 6502 bus.
maurice6502 wrote:
To avoid any error at 230Kbaud 18,432,000 Hz is the maximum clock below 20Mhz ; using oscillator insthead resonator should be possible to overclock AVR at 22,118,400 hz with zero error
Proxy wrote:
interesting! i knew AVRs generate the baud rate internally, but i thought they just had a hardwired oscillator for that and didn't make use of any external clock. i guess it makes sense that they do use faster external oscillators.
Sorry but use of internal AVR clock is not reccomanded for hi speed communications, I use resonator (or actrive oscillator to overclock)