??? 11/22/08 10:57 Modified: 11/22/08 11:01 Read: times |
#160195 - Depends on whether pull-ups are used or not Responding to: ???'s previous message |
Ravinder said:
what will happen if there is no external memory attached/burn out memory is attached and the program is written to access external memory??
i mean what would be the results of MOVC and MOVX instructions with no ext. memory attached?? Have a look at figure 28 and 29 of hardware description of 8051 series: http://www.nxp.com/acrobat_d...WARE_1.pdf You see, that a multiplexed port P0 is used to emit the low byte of programm counter (PC) to address the external memory and, a bit later, to receive the corresponding data byte. To access the data byte the P0 port lines go into tristate mode, i.e., they float. Now, if no pull-ups are connected to the P0 port lines, the status on these lines at the moment of data sampling is undetermined, it could be "0" or "1". In such a situation your micro could indeed "hang". (If "hanging" means the execution of undetermined "code".) On the other hand, when using pull-ups at P0 port lines, what I do always, by the help of an 10k array e.g., then the read data on P0 port lines are all "ONES". (Assumed, that the stray capacitance on P0 port lines is low enough to be charged in time.) Now, have a look at page 38 of programming guide of 8051 series: http://www.nxp.com/acrobat_d...UIDE_1.pdf You can see, that the data byte "1111 1111" corresponds to the instruction "MOV R7,A", which moves the content of accumulator to register R7. This is regular code. Whether it's useful or not is in the eye of beholder... Kai |
Topic | Author | Date |
Micro-controller Hang conditions?? | 01/01/70 00:00 | |
What do you mean by "hang"? | 01/01/70 00:00 | |
Hang-up vs. lock-up | 01/01/70 00:00 | |
colloquialisms | 01/01/70 00:00 | |
hard-and-fast defitionion | 01/01/70 00:00 | |
Micro-controller Hang conditions?? | 01/01/70 00:00 | |
What do *you* think? | 01/01/70 00:00 | |
?? | 01/01/70 00:00 | |
Learning to think for oneself | 01/01/70 00:00 | |
Hand out tools | 01/01/70 00:00 | |
Unless one is really willing to hand over | 01/01/70 00:00 | |
Yes! That's the point! | 01/01/70 00:00 | |
Depends on whether pull-ups are used or not | 01/01/70 00:00 | |
unexistent external memory | 01/01/70 00:00 | |
No table | 01/01/70 00:00 | |
I like that analogy!![]() | 01/01/70 00:00 |