PDA

View Full Version : Microcode Studio 18f2455 problem?????



volkan
- 21st May 2007, 01:05
hi everyone,

this is my first post.I am happy to be here.

Now I have a problem with Microcode Studio.My problem is about compiling a program with 18f2455.My code is here.I wrote this code random , cursory.
-------------------------------------
include "modedefs.bas"

durum1 var byte
durum2 var byte
durum3 var byte
durum4 var byte

output porta.1
trisb=%11111111


if portb.0=1 then
serout porta.1,t300,["a",durum1]
endif


if portb.1=1 then
serout porta.1,t300,["b",durum2]
endif


if portb.2=1 then
serout porta.1,t300,["c",durum3]
endif


if portb.3=1 then
serout porta.1,t300,["d",durum4]
endif

END
----------------------------------------
But when ı compile this with any other microcontrollers there is no problem.Compiling is successfull.But compiling with 18f2455 or 18f2550 there is a problem below.
http://img526.imageshack.us/img526/1825/hata2li7.jpg

I couldnt understand the error.What can ı do about it?What is the problem here? I have no any idea.I tried to do config settins by codes but I failed.I really need a help

Thank you for your answer

skimask
- 21st May 2007, 01:53
Is that ALL of your code?

volkan
- 21st May 2007, 10:05
yes What are you waiting? I am new about Picbasic. That is all.

mackrackit
- 21st May 2007, 11:23
Is that ALL of your code?
This does not look like all of the code because of the errors.


tried to do config settins by codes
Show us how you did this. Then maybe it will be all of your code.

I would guess that is your problem. What other PICs does all of your code work with?

Personally I like to change the configs in the *.inc file. Make a copy though in case you mess it up.

Tell the needed info and I am sure you will be helped.

volkan
- 21st May 2007, 12:11
thank you for your interest.without config codes my error is above.But When I include 1f2455.bas or 18f2455.ınc ( ı dont know which one to include ) , ı see more error. Here is all of my code.But after a saerch ı found some knowledge about it.For example ı found this site here. http://www.protongeeks.com/index.php?option=com_content&task=view&id=73&Itemid=29 And ı copied the code which in the bottom of the site.But again ı saw errors.


maybe Even this codes arent the right codes for my project, picbasic pro must compile it.But it fail.

And ı tried this program with PIC18F2455/2550/4455/4550 and ı saw the error above.But for example by trying it 18f452 , no problem.it is compiling.


Here is a sample for me .And my project is about mobile robot.ı use rf modules.
Transmitter side
16f84a
rf transmitter
and parallel port input

Receiver side
18f2455
rf receiver
motors

actually
ı wrote this code for 16f84a at the side of transmit.it compiled.But When ı tried this 18f2455,there are errors.

Can anybody of you help me about how to receive serial signals by picbasic.And ı will try it by 18f2455.I hope ı could tell myself.

skimask
- 21st May 2007, 13:35
For example ı found this site here. http://www.protongeeks.com/index.php?option=com_content&task=view&id=73&Itemid=29 And ı copied the code which in the bottom of the site.But again ı saw errors.

maybe Even this codes arent the right codes for my project, picbasic pro must compile it.But it fail.



PicBasicPro <> Proton Basic

volkan
- 21st May 2007, 13:45
you are right . I really didnt notice it. Have yoyu got any idea about it?

skimask
- 21st May 2007, 14:51
you are right . I really didnt notice it. Have yoyu got any idea about it?

Nope...if I did, I probably would've said something earlier...

volkan
- 21st May 2007, 19:43
when ı add the 18f2455.ınc an error occurs. Must ı add config codes or include 18f2455.ınc ???

skimask
- 21st May 2007, 20:07
when ı add the 18f2455.ınc an error occurs. Must ı add config codes or include 18f2455.ınc ???

http://www.picbasic.co.uk/forum/showthread.php?t=5777&highlight=config+fuses

Bruce
- 21st May 2007, 21:03
Download & install the latest version of MPLAB. That should cure your
problem.

For the 18F series, PBP includes device header files that are in your
Microchip MPASM Suite directory. If you have an old version of MPLAB
installed that doesn't have the P18F2455.INC file, that would be a problem
at compile time.

Archangel
- 21st May 2007, 21:04
Is that ALL of your code?



durum1 var byte
durum2 var byte
durum3 var byte
durum4 var byte




if portb.0=1 then
serout porta.1,t300,["a",durum1]
endif


if portb.1=1 then
serout porta.1,t300,["b",durum2]
endif


if portb.2=1 then
serout porta.1,t300,["c",durum3]
endif


if portb.3=1 then
serout porta.1,t300,["d",durum4]
endif


I see variables being setup in 1st code block, and I see The variables value being outputted in serial format, I do not see how these variables get any value to be displayed. So I repeat skimask's question: is this all of your code?
JS