Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Hex line 6 not formated

Status
Not open for further replies.

be80be

Well-Known Member
I get a hex line 6 is not Intel format

Code:
:1000000025006400030A67006400E50BE20BFF0FA4
:1003C000FF0FFF0F3D0C0600000867000609E80B51
:1003D0002605F90C28000400E802EB0BEF0B0400E3
:1003E000010C3F001F02E7012604F90C280004005D
:0E03F000E802F70BFB0B0400E80BE80B020A17
:021FFE00EAFFF8
:00000001FF

It's just a blink program
Im using Hi_tech C and trying to debug with Oshonsoft It will not load the HEX
 
Last edited by a moderator:
I have never tried to run a hex file in oshonsoft...BUT there is an option in the build/project/linker tab for extending the hex addresses

I've just loaded a Hi-tec C hex file into oshonsoft.... works as expected..

Code:
:020000001028C6
:10000800FE00030EF0000408F1000A08F200831253
:1000180003137F08F3005C288628831603138101E5
:100028008B1606112230F700F4007408F6007608E3
:100038008312031381008B17212883120313051CD5
:10004800262827283D283E30760203182C282D28FC
:100058003D280130F4007408F6070130F7024130FA
:10006800F500EE30F400F40B3728F50B3728640060
:100078003D2883120313851C422843282128073072
:100088007602031C4828492821280130F60201304D
:10009800F4007408F7074130F500EE30F400F40B73
:1000A8005328F50B532864002128212821281028DB
:1000B8000B1D5F2860287B28F8097808031D652830
:1000C8006A287603FF3AFF3E81006F287703FF3ADC
:1000D800FF3E81006F287818722876288312031350
:1000E800061579288312031306110B117B28730850
:1000F800FF0072088A0071088400700E8300FE0EEB
:0A0108007E0E0900F80183011128A2
:00000001FF
 
Last edited:
I've never had any problems before It's just a blink led on a 12f508 but here is what happens when I load it
 
hi burt,
I have tried your hex in Oshonsoft, get the same error message.

I have loaded a number of hex files from different sources into OSH , never had a problem.
 
Hi Eric I never had this happen I was trying some code using the timer and it wouldn't load that so I did a blinkie in H-tech C no go. I'm thinking it has something to do with the OCCal setting H-tech did do that for you
I don't think it is now
 
Hi Eric I never had this happen I was trying some code using the timer and it wouldn't load that so I did a blinkie in H-tech C no go. I'm thinking it has something to do with the OCCal setting H-tech did do that for you
I don't think it is now

hi,
I did try to dis-assemble the hex using OSH, but it displayed lots of 'unrecognised lines' in the listing
Which PIC is it for.?
 
Well I give up trying Hi-tech C to compile for the 12f508 I have even tried the the pro and it makes the same HEX It's not adding the config or OCCAL right ASM works I'll just write the code in that LOL
 
Well I give up trying Hi-tech C to compile for the 12f508 I have even tried the the pro and it makes the same HEX It's not adding the config or OCCAL right ASM works I'll just write the code in that LOL

hi burt,
Used Nigels prommer to disassemble your hex file [ used 12C508]

Then on Oshonsoft set as 12F508 , it assembles and runs OK.

Copied the new hex file, see old and new below.

;reassembled
:0E00000025006400030A67006400E50BE20BB4
:0C03C4003D0C0600000867000609E80B6D
:1003D0002605F90C28000400E802EB0BEF0B0400E3
:1003E000010C2F000F02E7012604F90C280004007D
:0E03F000E802F70BFB0B0400E80BE80B020A17
:021FFE000A00D7
:00000001FF

;original
:1000000025006400030A67006400E50BE20BFF0FA4
:1003C000FF0FFF0F3D0C0600000867000609E80B51
:1003D0002605F90C28000400E802EB0BEF0B0400E3
:1003E000010C3F001F02E7012604F90C280004005D
:0E03F000E802F70BFB0B0400E80BE80B020A17
:021FFE00EAFFF8
:00000001FF


Code:
; Generated by WinPicProg 1.91, (c) Nigel Goodwin 2002.

            LIST      P=12F508, F=INHX8M
            include "P12F508.inc"
            __CONFIG 0x000A

            ORG     0x0000

            MOVWF   OSCCAL
            CLRF    FSR
Label_000A  GOTO    Label_0001
Label_0001  CLRF    0x07
            CLRF    FSR
            GOTO    Label_0002
Label_0004  GOTO    Label_0003
            ORG     0x01E2
Label_0003  MOVLW   0x3D
            TRIS    GPIO
            RETLW   0x00
Label_0002  CLRF    0x07
            CALL    Label_0004
            GOTO    Label_0005
Label_0005  BSF     GPIO      , 01
            MOVLW   0xF9
            MOVWF   0x08
Label_0006  CLRWDT
            DECFSZ  0x08      , f
            GOTO    Label_0006
            GOTO    Label_0007
Label_0007  CLRWDT
            MOVLW   0x01
            MOVWF   0x0F
            MOVF    0x0F      , W
            ADDWF   0x07      , f
            BCF     GPIO      , 01
            MOVLW   0xF9
            MOVWF   0x08
Label_0008  CLRWDT
            DECFSZ  0x08      , f
            GOTO    Label_0008
            GOTO    Label_0009
Label_0009  CLRWDT
            GOTO    Label_0005
            GOTO    Label_0005
            GOTO    Label_000A
 
 

            END
 
I was looking at Hi-tech and they have a program called hexmate thats to fix theses problems but the hex you posted works fine It toggles gp1 like I wrote it in C. But it's funny that I can't use the Hex that Hi-tech makes with Oshonsoft Thanks Eric ps I downloaded Nigels progaming WinPicProg It give a nice asm file thanks for showing that
 
Well I tried the same code on my shop PC and it does the same thing but the code runs when loaded on a real pic.
So I compiled the code doing the same thing but using PBP and it loads in Oshonsoft But it doesn't do as it should
Maybe Oshonsoft don't like 12f508 chips or it doesn't like the new MPLAB Assembler
 
Just a thought. I took a quick look at the 12f508 and it sort of a mix between the new 12F683 and the old 12F629 with internal oscillator. It has (limited) OSCCAL tuning capability (like the new family) and also has stored calibration (similar to the OSCTUNE of the old family). IIRC, Oshonsoft did not work too well (for Sims) with the internal oscillators of the old family, because the HEX contained instructions (ignored by the Sim) to load the OSC calibration instruction programmed into the last address of memory. This last address would have the instruction: MOVLW XX, where XX is the calibration value.
 
You may be on to something I have tried 3 programs and only one works the ASM that Eric posted Blinks a led The HI-Tech C one will not load and the PIC basic Pro code will not blink but If I load the chip with them using the pickit2 all 3 work fine.
 
Well I figured out what is happening here it's the configure that's wrong format
 
It's not readable in oshonsoft for the 12f508 that's what is causing the hex not to load. You can dissemble the hex like Eric did And then assemble it in oshonsoft using the config word __CONFIG _MCLRE_ON & _CP_OFF & _WDT_OFF & _IntRC_OSC and it makes a Hex that that oshonsoft will use

This is what oshonsoft wants a config of fffh it should be 000A
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top