gnupic: Re: [gnupic] Cannot get 18f252 to blink
Subject:
Re: [gnupic] Cannot get 18f252 to blink
From:
Scott Dattalo ####@####.####
Date:
25 Oct 2006 00:11:52 +0100
Message-Id: <453E9DB1.4070402@dattalo.com>
####@####.#### wrote:
> David,
>
> I beleive that the 18f252 does split RAM and function registers at 0x80. Have you
> tried gpsim? As an aside, the 18f has "bra" instructions that assemble to single word
> opcodes that could be used in place of the longer/slower "goto"'s.
George,
These were my thoughts too. For gpsim both the .cod (obtained from
assembling the .asm file) and the .hex simulate correctly. However, the
second .hex file is corrupt. gpdasm gives:
$ gpdasm -i -p 18f452 t.hex
hex file name: t.hex
hex file format: inhx32
number of bytes: 160
000000: 0e04 movlw 0x4
000002: 6000 cpfslt 0, 0
000004: 0e00 movlw 0
000006: 6e92 movwf 0x92, 0
000008: 0092 dw 0x92 ;unknown opcode
00000a: 0e00 movlw 0
00000c: 0e00 movlw 0
00000e: 0000 nop
000010: 0c01 retlw 0x1
000012: 0000 nop
It appears that either the device is programmed incorrectly or the
programmer is incapable of reading the program memory.
David,
Has the device ever programmed correctly before? And, do you know if
your programmer even works?
Scott