FROM: IL50/GATE/POSTMASTER TO: pic microcontroller discussion DATE: 06-02-98 TIME: 07:46 SUBJECT: Mail failure ------------------------------------------------------------------------------ [021] Message was not delivered due to missing routing file. ------------------------------------------------------------------------------ >Unfortunately I already had to order the devices and I found the AMD flash >memory (with 45ns access) for optimal in my case. This is an 128K x 8 >chip. I have also ordered the latches. PROBLEM - You want 64K x 16. The x8 won't fly!! >How does the address decoder look like for this chip (or in general for >8bit devices on a 16bit port) and what does it perform ? If I'm understanding you correctly, NO CAN DO. Here's what I did: PIC "Address/Data" pins all go to inputs of Cyrix 16-bit-wide '373 chip. Also, they go directly to DQ pins on memory chip. Lowest 13 outputs of 16-bit-wide '373 chip go directly to address pins on memory chip. Highest 3 outputs of 16-bit-wide '373 chip go directly to GAL which is "address decoder". Outputs of GAL go do address pins on memory chip. Inside the GAL, I have it set so that Ax-out = Ax-in unless another GAL input, BANKSEL, is low. If BANKSEL is low, the Ax-out causes the address to be "moved" on the external memory. What this does is allows me to access a full 64K of external memory (even the part hidden by the internal ROM - remember I'm in extended uC mode) to do data storage. The external memory is not available for program memory by my method. The GAL is totally optional. You could just as well connect ALL the '373 outputs directly to the memory chip. Then you could run in microprocessor mode using a pre-programmed EPROM/FLASH/SRAM with no problem. >Since I use both program memories can I presume that I have to run the PIC >in "extended microcontroller mode"? Yes, if you want to use the internal ROM it is. >Or is it also possible to have the >RS232 setup program in external memory, without using any internal mem.? Sure, you can do that, but then you have to program the FLASH before installing it in the board. My method was developed to permit me to have a BIOS in the chip which was always alive, and an external application in SRAM which could be updated in the field by a tech with a laptop. The BIOS supports the programming of the external RAM using a simple program. As for memory, don't make it more difficult than it really is. Using 16-bit-wide devices, just follow the external memory format in the data sheet. BTW, if you are running in uP mode, you DON'T need to program the PIC - it comes that way! >Sorry, I presumed TTL I/O devices, but didn't write it. Is 4.7KOhm then >OK ? It depends on what those outputs would do. It really does! Andy ================================================================== Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA ==================================================D===============