what is the meaning of H'0001'

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View


Hi can anyone tell me the meaning of  H'0001'  I'm new to picmicro
programming and not even sure if this is the right forum, so sorry in
advance if its not. I understand 0bh as a hexadecimal number but what
is  H'0001'  is it hexadecimal its the notation that has me stumpt.

Thanks
Steve


Re: what is the meaning of H'0001'



Quoted text here. Click to load it

It's whatever the language translater specs it to be, but I'd guess that
it is a 16-bit unsigned that's equal to decimal 1.

--
Rich Webb   Norfolk, VA

Re: what is the meaning of H'0001'


It's so that there is no misunderstanding of the base of the number. In this
case, it doesn't matter, but 98 decimal is different to 98Hex etc.

Quoted text here. Click to load it



Re: what is the meaning of H'0001'



So the question still remains, do you think this represents a hex
number?

Its strange because its in a pic program as follows:

equ clk H'0001'
bcf  PORTA, clk

now the bcf means clear the bit in the file register PORTA, which is a
4 bit register, and the bit to clear is represented by the H'0001' so
it would look like bit 1 needs clearing, but why use the H'0001'
notation? when it could just be written as bcf PORTA,1

However H'0001' does look like a 16 bit hexadecimal number, but hex is
normally represented as e.g. FFh or 0xFF

Or maybe i've just got it wrong, can anyone shed any light on this?

Thanks
Steve


Re: what is the meaning of H'0001'


snipped-for-privacy@hotmail.com says...
Quoted text here. Click to load it
Yes I would look at it and think a base16 number.

Quoted text here. Click to load it

Because you can change the value of clk to match the hardware if there
were future changes AND it makes the code more readable.  We now know
that the code is toggling an output that is (most likely) a clock line
of some sort.

Quoted text here. Click to load it
Depends on your assembler.

Quoted text here. Click to load it

Site Timeline