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 CCS Technical Support

dsPIC30F some outputs not switching

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



Joined: 05 Dec 2011
Posts: 1
Location: East Yorkshire, UK

View user's profile Send private message Visit poster's website

dsPIC30F some outputs not switching
PostPosted: Mon Dec 05, 2011 9:59 am     Reply with quote

Hello,

I'm currently debugging a prototype siren based around the dsPIC30F5011. I'm using CCS C v4.057, MPLAB v8.63, and ICD3 as the debugger.
I'm having trouble getting RD2 and RD3 to switch on.
These pins can also be compare pins which I have turned off.
Code:
 
SETUP_COMPARE(3, COMPARE_OFF);
SETUP_COMPARE(4, COMPARE_OFF);

and configured as outputs
Code:

SET_TRIS_D(0b0000011100100001);

I'm currently at the very simple do the inputs and outputs work stage.
Code:

while(TRUE) // never ending loop
{ // start of never ending while loop
delay_ms(20);
get_inputs(); // read in positive and negative inputs
if (input1)output_high(PIN_D3);
else output_low(PIN_D3);
}

This is code is working on pins D1, D4-D8, but not on D2 and D3 as I can see PORTD and LATD being switched in the watch window.
However in the case of D2 and D3 I only see LATD being switched whilst PORTD remains 0.
Any help or suggestions would be greatly appreciated.

Thanks

Ben
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