Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with PIC16F877 [solved]
#1
Everytime I want to program the chip a message comes up say no goto at org 0. What am I doing wrong. Please help. I am using latest ds30 bootloader and mplab to asemmble the bootloader file. I program the chip with ICD2. Huh
Reply
#2
Upload the hex file and I will take a look at it.
Reply
#3
(2012-02-19, 06:32:07)antonadc Wrote: Everytime I want to program the chip a message comes up say no goto at org 0. What am I doing wrong. Please help. I am using latest ds30 bootloader and mplab to asemmble the bootloader file. I program the chip with ICD2. Huh



Attached Files
.txt   pic16f877_8.hex.txt (Size: 46.48 KB / Downloads: 6)
Reply
#4
(2012-02-19, 13:33:24)Mikael Gustafsson Wrote: Upload the hex file and I will take a look at it.

Uploaded hex file with txt ext. Just remove.txt Thanks
Reply
#5
Thank you. That was the bootloader right? I need your application hex file and preferably the source as well.
Reply
#6
I have partially solved the problem. Firstly I discoverred to my horrer I had an old ds30 program. I re-installed the new program and it all seemed to work ok until I discovered that the 877 code will not work. Checking my hex file (From Proton+ crownhill ass) The first location for the 18 and 16 series is zero. This is to make way for the location 0 goto instruction. Not much I can do. The ds30 18 BL has one location open at 0 and that is for the goto. Now the ds30 bl for the 16 series has 3 bytes in it 2 for bank switching and the last for goto. Can the first 2 bytes not be removed and the goto put at 0? Please.

Thanks

Anton
Reply
#7
What do you mean by "the 877 code will not work"?
What is "Proton+ crownhill ass"?
Upload or send me the application hex file and preferably the source as well.

Regards
Mikael
Reply
#8
(2012-02-22, 22:51:38)Mikael Gustafsson Wrote: What do you mean by "the 877 code will not work"?
What is "Proton+ crownhill ass"?
Upload or send me the application hex file and preferably the source as well.

Regards
Mikael

It crashes on run with bl but if i program the hex file as is it works
The crownhill ass is a picbasic compilor. http://www.protonbasic.co.uk
done


Attached Files
.zip   vader.zip (Size: 28.01 KB / Downloads: 5)
Reply
#9
Thanks, I will take a look at it.
Reply
#10
Try with this setting:
Bootloader=Off
Reply
#11
(2012-02-23, 14:16:38)Mikael Gustafsson Wrote: Try with this setting:
Bootloader=Off

Sorry nothing works. I have programmed a small porgram to display a logo. When I program it directly into memory with ICD2 it works ok. With bootloader on or off and programming it with ds30 Bootloader the screen stays blank.


Attached Files
.txt   PICTURE.hex.txt (Size: 11.57 KB / Downloads: 5)
Reply
#12
Do you use exactly the same configuration bits in the bootloader as in the application?
Reply
#13
(2012-02-23, 21:09:45)Mikael Gustafsson Wrote: Do you use exactly the same configuration bits in the bootloader as in the application?

Thank you for reply will check.
Reply
#14
This was posted on the proton forum by another user
quote
I don't know if Proton accounts for this or not when a program first starts up, but in the sources I have for the 16F both ds30loader.asm and umc_loader.asm leave the banksel set for bank1 prior to jumping to the user code. Most compilers assume it's set to 0 like it would normally be at poweron, so when your app runs the banksel isn't what it would normally be without a bootloader.
unquote

I hope this helps

Anton
Reply
#15
That might be an issue. I will look into it.
Have you compared the configuration bits?
Reply
#16
(2012-02-28, 22:16:50)Mikael Gustafsson Wrote: That might be an issue. I will look into it.
Have you compared the configuration bits?

Thanks No not config bits tried that as well.
Reply
#17
Hi,
I have been busy with the commercial version. I will get back to this thread when I have time.
You cold try to clear the pclat register the first thing in you code.
Reply
#18
(2012-03-03, 23:06:50)Mikael Gustafsson Wrote: Hi,
I have been busy with the commercial version. I will get back to this thread when I have time.
You cold try to clear the pclat register the first thing in you code.

Thanks will try it
Reply
#19
Sorry I didn't mean the PCLAT register, i meant the BANKSEL bits as you pointed out earlier. Something like this
Code:
STATUS.RP0 = 0
STATUS.RP1 = 0
Reply
#20
(2012-03-06, 13:01:55)Mikael Gustafsson Wrote: Sorry I didn't mean the PCLAT register, i meant the BANKSEL bits as you pointed out earlier. Something like this
Code:
STATUS.RP0 = 0
STATUS.RP1 = 0

Yipee found the problem it is the status file.
;---------------------------------------------------------------------
; GOTO user application
;--------------------------------------------------------------------- org STARTADDR - 3 ;space to deposit goto application
loadusr
clrf STATUS <-- added this now all works ok
;nop ;page select, replaced by gui
;nop ;page select, replaced by gui
;nop ;goto, replaced by gui

Reply
#21
Great! Thanks for helping out. I will add this fix to the package.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)