??? 02/07/07 13:44 Read: times |
#132210 - answers.... Responding to: ???'s previous message |
Richard Erlacher said:
He doesn't want to buy other chips. In terms of microprocessor, eeprom and ram, I don't want to buy more. He wants to make THESE chips work. yes. It's his hobby project. It's his budget. It's his kitchen. Yes. The reason it will be difficult to make it work is that he's not considered timing constraints, and that he's operating his MCU outside specified limits, and that he's trying to make a PCB for the first time, and that he's got no test equipment by means of which he can determine what's wrong when the circuit doesn't behave as he expects. I suspect he also hasn't yet heard of metastability. OK, so if the way I was trying to use the clock was supposed to be unstable, then I'm thinking of hardcoding "jmp $". He probably is aware of the reset/FLASH-corruption issues that pop up from time to time. If a microcontroller only depends on internal flash, and the flash screws up, the microcontroller is dead, and useless. He has on hand an MCU that's essentially an 80C31. He has an EEPROM which, among other things, he wants to program in-circuit. BINGO! He's never said whether he has the means to program the EEPROM on its own, perhaps to see whether his MCU circuit works. In a previous project, I made a programmer for the same EEPROM, tested it in another 8051 board I made and everything worked perfectly (LCD displayed what I wanted, etc). That board didn't have the ability for me to program it using the parallel port. If I were going to advise him, I'd tell him to delay the EEPROM programming effort, and start by programming an SRAM from the PC's parallel port. I don't have problems with the parts themselves. The key is that he wants to do it himself... Yes , and in his way. Mostly. However, I am open to a few suggestions like the poster that mentioned using "JMP $". If he wanted to buy a solution, he'd have done that already. I don't order online, solutions cost high, and the time it takes to arrive just might be considerably long. and who know what kind of support you get? Goodness knows, those DIY-at-home PCB kits cost more than a decent kit of premade PC board and parts for an MCU circuit. I don't have a kit. What's more, if those FLASH-based IAP/ISP-capable parts were all they're advertised to be, we'd never be discussing reset circuit problems, or IAP/ISP problems. Let's try to help him do what HE wants, rather than what WE want. Thank you. The only way I can do it with a constantly running microcontroller is to add a bunch of buffers and 3 or 4 latches to support each command from the port. The 8051 requires between 1 and 4 bytes for each instruction, and a latch can hold it. So far, it seems that the most optimal code that I am using is this: NOP JNB P1.4,$ NOP JB P1.4,$ ----4-byte code from parallel port---- JMP 0 I'm avoiding the RESET line, because the reset must be held down long enough for a TRUE reset. When I use the code above, it seems for the first 8 bytes, it was so easy making a decoder. All I needed was one 2-input AND gate, and one 2-input OR gate. As soon as the last instruction was introduced, then I had to add a whole bunch of gates. Looks like I have some logic decoding to do. If I don't use latches, to hold the bytes, then I need to incorporate more complex code. I don't want to get too carried away with the code, or I will have problems making a "hardware ROM" for it. |