what is the meaning of H'0001'

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

Reply to
Loading thread data ...

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
Reply to
Rich Webb

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.

Reply to

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

Reply to

Yes I would look at it and think a base16 number.

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.

Depends on your assembler.

Reply to
James Beck

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.