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

Acces bank 18F452

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Johan van den Heever
Guest







Acces bank 18F452
PostPosted: Wed Jan 22, 2003 1:46 am     Reply with quote

I am passing a constant to a procedure with the following def:
void command_lcd(int8 command)
{
....
PORTD = command;
....
}
This procedure is called in the main loop to as part of the lcd init procedure:
void lcd_init()
{
command_lcd(6);
command_lcd(12);
.....
}
main
{
....
init_lcd();
....
}
My problem is the following: The correct value does not reach PORTD unless init_lcd() in the main loop is preceded by a BSR = 0 command. Is this normal? Can somebody please explain.
___________________________
This message was ported from CCS's old forum
Original Post ID: 10883
TSchultz



Joined: 08 Sep 2003
Posts: 66
Location: Toronto, Canada

View user's profile Send private message

RE: Acces bank 18F452
PostPosted: Wed Jan 22, 2003 5:49 am     Reply with quote

:=I am passing a constant to a procedure with the following def:
:=void command_lcd(int8 command)
:={
:=....
:= PORTD = command;
:=....
:=}
:=This procedure is called in the main loop to as part of the lcd init procedure:
:=void lcd_init()
:={
:= command_lcd(6);
:= command_lcd(12);
:= .....
:=}
:=main
:= {
:= ....
:= init_lcd();
:= ....
:= }
:=My problem is the following: The correct value does not reach PORTD unless init_lcd() in the main loop is preceded by a BSR = 0 command. Is this normal? Can somebody please explain.

What version of the compiler are you using?

I recently completed (I hope!) a project I switched over to a PIC18F452 and found a few "bugs" in the compiler mostly to do with the handling of the memory page select bits. I was using approx 900 bytes of the RAM and had to place #locate statements to manually place almost all of my varaible into specific page banks. Once I had done this most of the odd problems went away.

For example I found some problems with the compiler placing arrays across page banks. I did not take the time to verify that it generated the proper assembly to handle the page selections properly but it definitely caused problems for me. Once I moved all my arrays to manually selected areas those problems dissapeared.

I just wish they would provide a list of known issues so we all don't have to waste time troubleshooting things that are known to be bad. I do understand that the compiler is a work in progress but we knew ahead of time all the known issues it would make troubleshooting easier.

-Troy
___________________________
This message was ported from CCS's old forum
Original Post ID: 10887
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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