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

ADC test code
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
irmanao



Joined: 08 Apr 2015
Posts: 77

View user's profile Send private message

PostPosted: Sat Jul 11, 2015 5:21 am     Reply with quote

Ok i should have done this.. what i found is:

#byte PORTD=0x0E32
#byte PORTE=0x0E42


I've never used fuses. Are they needed in this program?

_thanks_
temtronic



Joined: 01 Jul 2010
Posts: 9633
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jul 11, 2015 6:45 am     Reply with quote

fuses are REQUIRED for every program.
they 'configure' the PIC.
Have a look at any of the example programs that CCS supplies.
Now fuses are specific to the series of PIC you're using, based upon the features of the PIC.
I do not use the 33 series PICs so perhaps another programmer will show you a 'typical' set of fuses that will work for you.

Jay
irmanao



Joined: 08 Apr 2015
Posts: 77

View user's profile Send private message

PostPosted: Sat Jul 11, 2015 4:22 pm     Reply with quote

That's how i connect the voltage..

http://postimg.org/image/f1rbzwibb/

For the fuses what i found in here is:
Code:

#fuses FRC_PLL,NOWDT,NOPROTECT
#use delay(internal=117920000)
temtronic



Joined: 01 Jul 2010
Posts: 9633
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Jul 11, 2015 5:29 pm     Reply with quote

OK maybe go back to the beginning....

program the PIC to flash an LED at a 1Hz rate. Show us the entire program as it's less than 30 lines of code and tell us if the LED actually does flash at a 1Hz rate.

As I said I don't use the 33 series but 117MHz for the clock seems pretty darn fast to me !!

By doing the '1Hz LED' program you will confirm the PIC,PCB, and coding is working and then we have a firm place to help you from

Jay
irmanao



Joined: 08 Apr 2015
Posts: 77

View user's profile Send private message

PostPosted: Mon Jul 13, 2015 9:07 am     Reply with quote

Ok this is embarrassing, it turns out i didn't connect the voltage correctly as i got confused with the connector's pin layout.


_thank you all for helping and sorry for wasting your time_
Ttelmah



Joined: 11 Mar 2010
Posts: 20061

View user's profile Send private message

PostPosted: Mon Jul 13, 2015 9:14 am     Reply with quote

Crying or Very sad

As a comment, why are the PORT definitions there?.

They won't work, since on this chip the ports are _words_ not bytes. Then they are basically pointless look at the CCS output_d, and output_e functions (and their input equivalents.
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
Page 2 of 2

 
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