News:

Let's find out together what makes a PIC Tick!

Main Menu

Register error

Started by Giuseppe MPO, Apr 29, 2021, 04:02 PM

Previous topic - Next topic

Giuseppe MPO

One thing that I cannot explain.
I have to update a 16 bit register of a CIP using a word variable.

If I do it in this way:

AT1CC1  = Impulso

checking the output waveform with an oscilloscope, it is not correct.

Writing like this:

AT1CC1L  = Impulso.LowByte
AT1CC1H  = Impulso.HighByte

everything works perfectly.

Aren't two ways equivalent?
Why two different operations?

tumbleweed

In the 8-bit devices, all of the SFR's are 8-bit.
None of the registers are defined as 16-bit.

Giuseppe MPO