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

Newbee re #fuses and #device

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



Joined: 04 Dec 2011
Posts: 4

View user's profile Send private message

Newbee re #fuses and #device
PostPosted: Fri Dec 14, 2018 8:20 am     Reply with quote

Very new to C although over the years I have tried and failed. Attempt 27 might be the charm.

I missed that you had to set ex_usb_common.h

If I change the header to 4550 and compile should the combo still show the original?

George


Last edited by towlerg on Fri Dec 14, 2018 9:18 am; edited 1 time in total
temtronic



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

View user's profile Send private message

PostPosted: Fri Dec 14, 2018 8:36 am     Reply with quote

The examples are 'generic' in nature although some will have 2 or 3 device options at the beginning of the program....

fuses are PIC specific AND project related. Not all PICs have all fuses,so again can't be in the examples. YOUR project might require some configuration of fuses that MY project doesn't, so again...can't be in examples.

Typically 'my-first-PIC-program' should be the 1Hz LED program. That will prove that the PIC functions, HW is more or less OK and that you CAN program working code.

Since PICs can have more fuses than instructions, I now have an '#INCLUDE' file with a set of known ,working fuses. This 'baseline' file has ALL fuses in it, one per line WITH comments. It cleans up main() visually and I don't have to worry about my losuy typing anymore.

Jay
towlerg



Joined: 04 Dec 2011
Posts: 4

View user's profile Send private message

PostPosted: Fri Dec 14, 2018 9:20 am     Reply with quote

@temtronic thanks for the info, total misunderstanding of how usb examples worked. see my revised post.

Kindda surprised I can still edit my post after someone has replied?
temtronic



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

View user's profile Send private message

PostPosted: Fri Dec 14, 2018 9:49 am     Reply with quote

OK..I know the example does work with the 4550, as I used it years ago. I no longer use the 4550 (or any PIC with internal USB) as it is easier and cheaper to use a TTL<>USB module.
reasons include
1) cheaper. The TTL<>USB module only add $1 vs USB parts(connector,Rs,C, LED)
2) easy. Connect to any serial port of any PIC. I use the 18F46K22 for 99.99% of products
3) NO driver required. Saves a LOT of memory. About 1/3 of a 4550 IIRC.

When looking at 'cost', you need to consider PCB, parts AND your time. If you have to spend 3-4 days hacking the driver to make it work, chase down a : where a ; should be, or other minor glitch you've added to the cost of the project. USBTTL module is just $2 here in Canada, no muss, no fuss, they work. I do remove the power LED on them. They're way too BRIGHT and really not needed. Saves some power too !

just my thoughts....
jay
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

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

PostPosted: Fri Dec 14, 2018 2:19 pm     Reply with quote

I like to refer to the fuses.txt file that is in the PICC folder when you install your compiler. I cross reference that to the Configuration Bits section of the datasheet to figure out what I want to set.
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