Doubt abt HCS08 instruction set

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Doubt abt HCS08 instruction set

2,246 Views
sarathi
Contributor I
Hello Everybody,
                             I am new to this forum. My name s Parthasarathi doing 1 yr Mtech in Automotive electronics. I am come across HCS08 Microcontroller. In that instruction set, i am having doubt in "ADC, X" . In this command CPU ll take 3 bus cycles to execute this command. For ADC it ll take 1 cycle and for execution of X it ll take another command. Thn how s it possible for the third cycle. So please anybody clear my doubts.
 
bye
Labels (1)
0 Kudos
2 Replies

299 Views
firework
Contributor I
I thought the question was more about what is going on in the cycles.
 
In the first cycle is to fetch the instruction from memory, the second fetches the data pointed to by H:X and the third performs the addition. The second and third cycles appear (from an emulator trace) to occur after the fetch of the following instruction, but this should not matter to you.
0 Kudos

299 Views
UK_CF_FAE
NXP Employee
NXP Employee
Hi Sarathi,
 
I'm pleased you found the HC(S)08 products. The HC08 has been very successful in automotive markets, and products such as the newly announced MC9S08Dx family will prove to be popular in this market, too.
 
About the ADC, X - add with carry, indexed addressing mode. It doesn't work in the way that you think. In this mode, the H:X register acts as an index to the operand, so if H:X contains 0x0800, then the Add with Carry uses the value pointed to at address 0x0800. It just takes 3 cycles. First cycle is R - Read, second cycle is Free, 3rd cycle is P - program access.
 
You should look at the Addressing Mode section of the Core Reference Manual HCS08RMV1.pdf
0 Kudos