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

dsPIC33F I/O pin (CCS bug?)

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mabd



Joined: 17 Jan 2005
Posts: 8

View user's profile Send private message Send e-mail

dsPIC33F I/O pin (CCS bug?)
PostPosted: Thu Oct 21, 2010 4:00 am     Reply with quote

Hello everybody,

I'm working with dsPIC33FJ256MC710, the "explorer16 development board" and CCS compiler v4.110. I have a problem with G8 pin. When I try to set this pin as an input and I put a voltage (3.3v), the pin remains to 0v. And when I configure it as an output to 3.3v, it remains to 0v too. I have no load on this pin. There is no way to put it in high state (3.3v).
Microchip support sent me a program (MPLAB) and it works ok, but this same code with CCS doesn't work.
I've tried using "output_high(PIN_G8);" and it doesn't work either.
My dsPIC works ok and the rest of port G pins too. It seems like CCS compiler had a bug related to this pin.

My code (CCS) to configure as an output to 3.3v is: (doesn´t work)
Code:

bit_clear(*0x02E5,0); // write '0' in bit 8 of register TRISG
bit_set(*0x02E7,0); // write '1' in bit 8 of register PORTG
bit_set(*0x02E9,0); // write '1' in bit 8 of register LATG

Microchip support code (MPLAB) to configure as an output to 3.3v is: (work)
Code:

TRISGbits.TRISG8 = 0; // as output
PORTGbits.RG8 = 1;
LATGbits.LATG8 = 1;

Could anyone help me? Why can it be happening?
Thanks
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