Skimask, hi !

I tried the 10ms delays after read and write, but still no results, keep getting those 2 flashes.
When i read back the hex location 0x400 always reads 0001 (1 flash one 0, and one on 1, two flashes)

I have changed the code a little bit to let the variable increment whilst the power is on to be sure it increments, but after power off, power on, again two flashes ...

Here's the code:
Code:
'==== Set fuses ============================================
@ device  pic12F519, intrc_osc, wdt_off, mclr_off, ioscfs_on, protect_off, cpdf_off

'==== Set defines =========================================
OPTION_REG = %10000000

'==== Set variables ============================================
Y       VAR word                                        'To Hold the 12-bit RC5 code
TMP     var BYTE                                        'Temp variable
tmp2    var byte


'==== Set IO =================================================    
TRISB   = %00111100                                     'Set TRIS register input's & output's
PORTB   = %00000000                                     'Set all digital low
led     var PORTB.0                                     'led pin

'==== Main program ============================================
MAIN:
pause 400
tmp = 0

read 0,tmp
pause 10
if tmp > 50 then tmp = 1
if tmp < 1 then tmp = 1

again:
tmp = tmp + 1
write 0,tmp
pause 10
tmp2 = 0

for tmp2 = 1 to tmp
    led = 1
    pause 200
    led = 0
    pause 400
next tmp2

pause 2000
goto again
end
What is wrong, here ?