free_electron:
"- put a reset switch on the board (short cap)" - P1 on page 5
that don't look like a switch to me ...
go download my altium library...
"- the 1000 uf capacitor after the switcher is way too large." - i'll reduce it to ~ 220u
no, you need to look up in the switchers datasheet whow to calculate the correct capacitance. switchers don;t like itif you just slap on capacitor values that are ten or hundreds of times too large.
"- put proper reference generator for adc " - i don't intend to normally use the ADC - that's why it's directly wired to a header . the chip will be ok if AVREF+ is floating ?
no. avref+ can't be left floating. it needs a supply.
regarding the address space - i think i'll leave it as it is now - I want to have all 15 address bits for the peripheral bus
seems like you dont grasp the concept of address decoding and partitioning. or how the adressing on an 8051 works
8051 has 4 memory spaces
- SFR's special function registers. these are internal in the chip , serial ports, adc , timers etc
-IRAM internal ram. very limited 128 or 256 bytes of ram
-XRAM external ram : 64Kbyte address space
-ROM either internal or external dictated by the state of the EA pin : 64K address range.
it does not make sense to bring out the ROM space on the expansion connector. Rom is on board. put two chip sockets if you need to. ROM space is always READ ONLY. there are no instructions int he 8051 that can write there.
The PSEN pin selects between XRAM and ROM space (Program Store enable)
normally you wire up 27c256 eeprom's as follows : : wire them into A0 to A14
A15 gets an inverter. A15 OR PSEN goes to CE of first rom , A15\ or PSEN goes to PSEN of the second rom
the RD\ pin controls the OE\ of the eproms
you will have no glitches if you do it this way. this is the only correct bus cycle. anything else is a kludge made by people that dont understand the 8051 bus cycles.
Rams and any io circuitry are only active if PSEN is high
so you use PSEN to control the active high enableof an 74138.
Wire your 32K ram into the lower address range ( NAND the lower 4 outputs of the 74138 ) and control the CE pin
RD pin goes to OE WR pin goes to WR of the ram.
the upper 4 outputs of the 74138 become expansion selects.
bring out tha address bus , databus , rd wr and those select signals anfd off you go.
your IO connector is now properly partitioned and no matter what gets connected externally cannot interfere with the hardware on themotherboard as the decoder blocks that off.
My other remarks were because your board is so large and vempty. there is plenty of room to put on the eeprom and rtc chip , ftdi chip and some other stuff
Send me the Schdoc's and pcbdoc and pcbprj. I'll tweak it a bit and show you how to draw proper schematic and do the memory decoding of the 8051.
Some people suggested using a PAL or GAL for the decoding. stay away from that. while those are great they are an additional problem to deal with. you need a pal programmer, the software to make the fusemap and if you have never done that it is more trouble than it is worth. the glue logic needed is only aninverter a couple of or gates and a nand and a 74138 ( you may even get away without the 74138 ...)