$ is just a tag that mean it's a HEX value.
The PBP default 'radix' (if i can call it like that) is dec. So when you want to use Binary or Hex value, you must tell to the compiler.
MyVar=10 <= 10 decimal
Myvar =$90 <= 90 HEXadecimal
MyVar=%11110000 <= Binary value = $F0 = 240 decimal
Code:
please explain
MAIN
OPTION_REG=$0
ON INTERRUPT GoTo bump
INTCON=$90
Hard to say what it does if we don't know the PIC model. BUT many times, some of the interrupts flags are reset in the INTCON register.
Better and safer if you refer to your PIC datasheet to see what it do.
In my case, i prefer to use Binary as value. Easier to refer to the datasheet after few months/week/year/Century/milenium ...
INTCON=%10010000 is easier to figure out with the datashet than INTCON=$90 IMHO once again.
Also use Alias/Symbol to access directly to a specific register bit, Let's say
Code:
RCIF VAR PIR1.5 ' USART rx interrupt flag => Buffer full/empty
GO_DONE VAR ADCON0.0 ' ADC conversion status bit
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks