CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

printf with rs232
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
kloppy



Joined: 28 Jul 2004
Posts: 32

View user's profile Send private message

PostPosted: Tue Aug 03, 2004 2:54 pm     Reply with quote

1. this is not possible because if i delete the printf and compile the program, then it works.

2. i always check the configuration bits before i download the file. so this also can't be the problem

3.i am using picstart plus. in this case i program from adress 0 to 01ff. that should be enough... (i also check that everytime i download a hexfile)

i tried something else: here is the hexfile i read out of the programmed pic (the program that doesn't work):
Code:
:020000040000FA
:1000000000308A006D28FF3FFF00030E8301A1002E
:100010000A08A0008A010408A2007708A300780853
:10002000A4007908A5007A08A6007B08A70083131E
:1000300083128C308400801E1F288C1A32282208DC
:1000400084002308F7002408F8002508F900260892
:10005000FA002708FB0020088A00210E8300FF0E0B
:100060007F0E09008A110A12FF3F0A108A100A1136
:1000700082077234653463346534693476346534A8
:100080006434203400348C1E43281808A8001A0851
:10009000F800A81C4D281812181600008A110A1220
:1000A000522843287808AA008C128A110A121F28A5
:1000B0002C308400000803196A280630F800F70184
:1000C000F70B6028F80B5F287B30F700F70B6628EA
:1000D000800B5D288A110A128A2884011F3083054B
:1000E000073083169F008312A801403083169900C1
:1000F00026309800903083129800FF30A900AA01A2
:1001000083168C16C03083128B040430AB00FA3097
:10011000AC005828AB0B87282A080C1E8D289900A4
:1001200020300C1E91289900AB012B083520AB0A1A
:100130000C1E9828990009302B02031D952885284C
:10014000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FBF
:10015000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FAF
:10016000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F9F
:10017000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F8F
:10018000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F7F
.....
...
.
it isn't the same!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 03, 2004 4:06 pm     Reply with quote

I reformated your downloaded HEX file, to make it easier to read.
I found 2 or 3 anomalies. These are highlighted in bold, below.

At ROM address 0003, there is supposed to be a NOP, which is 0000.
But in your file it's 3FFF (The hex file formats this as FF3F).
So that location is not being programmed properly.

At ROM address 0034, there should be a GOTO statement.
Instead, it's 3FFF. That location is not being programmed.

Finally, there should be a SLEEP instruction (opcode = 0063)
at the end of the program. It's not there.

So where is the problem ? It could be in the programmer, except
that you're able to program Mark's and my Hex files OK.

Why don't you try using a different version of MPLAB ?
Try vs. 5.70.40. It's the last of the vs. 5.xx MPLABs.
I know it works. I use it. It can co-exist with vs. 6.xx
because they are installed in different folders, automatically.
Here's the link.
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019826

:02000004 0000 FA
:10000000 0030 8A00 6D28 FF3F FF00 030E 8301 A100 2E
:10001000 0A08 A000 8A01 0408 A200 7708 A300 7808 53
:10002000 A400 7908 A500 7A08 A600 7B08 A700 8313 1E
:10003000 8312 8C30 8400 801E 1F28 8C1A 3228 2208 DC
:10004000 8400 2308 F700 2408 F800 2508 F900 2608 92
:10005000 FA00 2708 FB00 2008 8A00 210E 8300 FF0E 0B
:10006000 7F0E 0900 8A11 0A12 FF3F 0A10 8A10 0A11 36
:10007000 8207 7234 6534 6334 6534 6934 7634 6534 A8
:10008000 6434 2034 0034 8C1E 4328 1808 A800 1A08 51
:10009000 F800 A81C 4D28 1812 1816 0000 8A11 0A12 20
:1000A000 5228 4328 7808 AA00 8C12 8A11 0A12 1F28 A5
:1000B000 2C30 8400 0008 0319 6A28 0630 F800 F701 84
:1000C000 F70B 6028 F80B 5F28 7B30 F700 F70B 6628 EA
:1000D000 800B 5D28 8A11 0A12 8A28 8401 1F30 8305 4B
:1000E000 0730 8316 9F00 8312 A801 4030 8316 9900 C1
:1000F000 2630 9800 9030 8312 9800 FF30 A900 AA01 A2
:10010000 8316 8C16 C030 8312 8B04 0430 AB00 FA30 97
:10011000 AC00 5828 AB0B 8728 2A08 0C1E 8D28 9900 A4
:10012000 2030 0C1E 9128 9900 AB01 2B08 3520 AB0A 1A
:10013000 0C1E 9828 9900 0930 2B02 031D 9528 8528 4C
Guest








PostPosted: Thu Aug 05, 2004 7:50 am     Reply with quote

i downloaded, installed mplab 5.xx and compiled my program. it worked! so my compiler doesn't work with mplab ver 6.xx?!
do you think i can use mplab 6.xx with a new compiler version?


ps: the thing with the printf/interrupt is not the only thing that doesn't work. in another project i also had other problems. also those are solved with the old mplab version....
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 05, 2004 1:13 pm     Reply with quote

Quote:
Do you think I can use mplab 6.xx with a new compiler version?

Yes.
kloppy



Joined: 28 Jul 2004
Posts: 32

View user's profile Send private message

PostPosted: Fri Aug 06, 2004 5:41 am     Reply with quote

ok, i ordered a new compiler..
thank you very much for your support!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group