I know there is an EE or CpE still awake...

JohnCU

Banned
Dec 9, 2000
16,528
4
0
Let's say I have an infinite loop:

while(1)
{
*(0x8000) = *(0x8000) + 1
}

I have this loop so I can monitor certain parts of the bus of a microprocessor controller system using an oscilloscope to see which pins are high and low. 16 bit address, so obviously at 0x8000 the only pin active is A15 (A0...A15 = 16 bit address). Now, one of the questions I have to answer is why A15 goes low and A1 and OE are accessed? I say it's because of the arithmetic, there are some registers being accessed...?
 

acemcmac

Lifer
Mar 31, 2003
13,712
1
0
let me make a phonecall for you. I'm good friends with an EE who would almost definitley know the answer to this but he hasn't been well enough to post latley :beer:
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
what kind of system is this? is the program also in the RAM?

in any case, I'm not sure if the address is supposed to stay on the bus every cycle even if only that address is being accessed. the bus needs that address only during some periods
 

JohnCU

Banned
Dec 9, 2000
16,528
4
0
This is one of those 68HC12 motorola processors on an Axiom board. This is some C code I wrote to practice reading/writing from specific parts of memory.

The only thing I can logically come up with is the arithmetic part of my statement causing the OE to be accessed so you can read the stuff from 0x8000 which enables you to add 1 to whatever is in it.
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
Originally posted by: JohnCU
This is one of those 68HC12 motorola processors on an Axiom board. This is some C code I wrote to practice reading/writing from specific parts of memory.

The only thing I can logically come up with is the arithmetic part of my statement causing the OE to be accessed so you can read the stuff from 0x8000 which enables you to add 1 to whatever is in it.

yeah that line should read from the memory and load into a register, add 1 to it and write back the register to that same location
 

fbrdphreak

Lifer
Apr 17, 2004
17,555
1
0
Originally posted by: dighn
Originally posted by: JohnCU
This is one of those 68HC12 motorola processors on an Axiom board. This is some C code I wrote to practice reading/writing from specific parts of memory.

The only thing I can logically come up with is the arithmetic part of my statement causing the OE to be accessed so you can read the stuff from 0x8000 which enables you to add 1 to whatever is in it.

yeah that line should read from the memory and load into a register, add 1 to it and write back the register to that same location
Wouldn't this depend on how the processor interprets your commands into machine code? Could be doing it more inefficient...?
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
Originally posted by: fbrdphreak
Originally posted by: dighn

yeah that line should read from the memory and load into a register, add 1 to it and write back the register to that same location
Wouldn't this depend on how the processor interprets your commands into machine code? Could be doing it more inefficient...?

well, either way, there should be an instruction to load contents from 0x8000 into a register, causing a read operation on the memory
 

fbrdphreak

Lifer
Apr 17, 2004
17,555
1
0
Tru dat

Not saying I know the answer to the OP's question :p Still working on the programming outline for my own project