PDA

View Full Version : Analog Input port


Pleiku
05-08-01, 02:15 PM
I'm using NMIX/T-0020 and Buffalo Monitor V2.3. Technical support told me that I should not use port PE0 for any type of anolog input, otherwise it may damages the board. Why is that? What's the resistor (10K) from PE0 to ground under the board does?
HT

RMDumse
05-08-01, 02:33 PM
You might want to refer to the Buffalo monitor documentation, but as I recall, the Buffalo monitor uses PE0 to determine if the run an external program or to enter the monitor. As far as damaging the boards, I think some EEPROM control bits might be erased, but that's about as much as I can remember off the top of my head.

Oh, that resistor is so Buffalo doesn't see that pin floating and go off to an external program that may not exist.

Pleiku
05-08-01, 03:44 PM
Thanks for your reply.
It lights a bulb!
Incase the EEPROM control bits was erased. How could I fix that problem? I'm having problem conver from Analog to Digital using PE0, PE1, PE2, and PE3 port. The program always stop response when I try to using the ADC control port (address=0x1030). (Refer to Softwate forum for my codes)
How can I identify the EEPROM on the NMIX/T-0020 board?
Thanks alot.
HT

nmitech
05-08-01, 03:48 PM
Pleiku,

I think we both misunderstand each other by the last conversation.

You can use PE0 as a digital analog input and it will not damage anything as long as the input voltage at PE0 pin is not higher than VRH, (VRH default 5V).

There are some hardware setup is required to run the buffalo monitor on any NMI - HC11 CPU boards.
If you use the Buffalo monitor for your code development, just make sure PE0 is pulled down. Suggest to use a 10K resistor for pull down. So on the power up condition, your A/D input voltage at PE0 must be a logic low in order for the Buffalo PROMPT comes up . Once the Buffalo message is signed on, you can use your PE0 as an analog input or digital input channel as you wish. The 10K pull down resistor is mentioned in the READ.ME file.

If PE0 is a logic high on the power up condition then it will fall into the category below,
To autostart your program via the buffalo monitor then PE0 must pull high on power up condition. This also requires to install the JUMP opcode ($7E) at $B600 and the address to be execute at location $B601-$B602. This also mentioned in the Buffalo.Txt file.

I hope this answer your quuestions.


nmitech
----------

RMDumse
05-08-01, 04:06 PM
If BUFFALO tries to run a program at $B600 and there is no code associated with that address, what happens is anyones guess. The EEPROM is at address $B600 and in a run away condition, it may become scrambled. But there is also some EEPROM bits in the control registers which are in the $1000 - 103F block (or $B000-B03F in Forth system, etc.) Most significant set of EEPROM bits in the registers which comes to mind is at $103F, the control register, which can turn on or off ROM, EEPROM, COP, etc. After looking at your software, however, I don't think this EEPROM stuff is your problem. Let's try looking at the software first. On the other hand, if your board is locked up and won't reboot after running the software, then we'd probably have to try to recover the control bits with a software product like WIPE which puts the processor in the bootstrap mode (with also a physical jumper change) and forces a little program into RAM to set the control bits the way we want.