2005-01-12 12:36 AM
Read port value with EMU3 emulator
2005-01-11 08:52 PM
Hallo,
I write follwing value in the port A: PADR = 0x50; PADDR = 0xD0; PAOR = 0x10; When I read the value of the port A in the ST7 Peripheral Registers window in debug mode of the emulator, I get after execution of the code the following values: PADR = 0x7F; PADDR = 0xD0; PAOR = 0x10; But the assembly seems to be correct: LD A,#0x50 LD 0x00,A LD A,#0xd0 LD 0x01,A LD A,#0x10 LD 0x02,A Any ideas? Cheers, Olivier Baillard2005-01-12 12:26 AM
Hi Olivier,
as you see the real input values at the physical ports when you read in the data of the port (e.g with ld A,PADR), it seems to be all right with your application and the EMU3. A0 .. A3, A5 input floating: can take any value - you got '1' --> o.k. A4 output push/pull, data=1: can only take the value of '1' --> o.k. A6 output open drain, data=1: any value at the port - you got '1'. A7 output open drain, data=1: read value can become '0' --> o.k. Hope it helps WoRo2005-01-12 12:36 AM
Correction:
A7 output open drain, data = 0: read value can become '0' --> o.k. Sorry WoRo