K8048 programming

Hi all, I just got my k8048 to work, everything works fine(well, almost).
I have some questions about programming ASM files.
a. Is it possible to have variables?
b. Is there a random-function?
c. I downloaded microBasic, after creating a HEX file of the blinking led example, picprog2.exe says it contains no config-word or something.

Thanks.

Normally you will have to set the config-word in microBasic before compiling. Usually this is done via a button called “Edit Project” or something like that (I do not have MicroBasic, so I am not really sure).
Anyway, the config-word is not set in the basic code itself.
You can copy the settings of a working config word from the assembly code (directive __Config).

Thank you Dany, I copied the settings.
This worked, but it’s not doing anything on the k8048 itself after writing it.

Can you show your basic code please?

[code]program Led_blinking

main:
TRISB = 0 ’ Configure pins of PORTB as output
PORTB = %11111111 ’ Turn ON diodes on PORTB
while true
PORTB = not PORTB ’ Toggle diodes on portb
delay_ms(1000)
wend
end.
[/code]

Hi, thanks for the code.
I assume you are working with the PIC that was delivered with the kit (16F627)?
If this is the case then you will have to add following initialisation statements at the beginning of your code:

CMCON = 7 ' Disable Comparator module's OPTION_REG = $D7 ' Write the OPTION register.
I do not know if Basic knows the “$”, it stands for a hexadecimal value.
If you are not using the 16F627 then the names of the registers and the values to be put into then can be different. Please check the datasheet of the PIC involved.

Thank you very much Dany!
It works great.