Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 19th May 2008, 07:05 AM   (permalink)
Default how to detrmin the config bits

Im woundering how to determin wich configbits to use on a 18F4550.

Im using a SD card for storage (using mikroC compiler with libs for FAT16)
ADC (three of them)
and i got a 8 MHz Crystal
Im also ud\sing a DS1302 for timestamp on the file

I would be glad if someone could help me on how to choose the different config bits.
__________________
Simplicity rules

Good enought - its perfect ??

2 Gig of free online backup space

Are you a Chemist?
Kryten is offline   Reply With Quote
Old 19th May 2008, 07:09 AM   (permalink)
Default

If you are using C18 then check out this document.

Mike.
Pommie is online now   Reply With Quote
Old 19th May 2008, 07:17 AM   (permalink)
Default

Quote:
Originally Posted by Pommie View Post
If you are using C18 then check out this document.

Mike.
Thanks Mike,
I was going to prepare a summary of the 18F1320 CONFIG's for a project I am doing, saved me a job, IOU another beer.

Regards
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline   Reply With Quote
Old 19th May 2008, 10:29 AM   (permalink)
Default

Quote:
Originally Posted by Kryten View Post
Im woundering how to determin wich configbits to use on a 18F4550.

Im using a SD card for storage (using mikroC compiler with libs for FAT16)
ADC (three of them)
and i got a 8 MHz Crystal
Im also ud\sing a DS1302 for timestamp on the file

I would be glad if someone could help me on how to choose the different config bits.
You will have to read the data sheet. The mikroC keep the config bit's in the project (not in the C/H files like normal compilers). You have a list of bits so you select ones you want to use. The config bit's are named exactly like they are named in data sheet, so it is fairly simple. If there is some "special" bit you do not understand (what it does / what it is for) post a direct question. In 99% cases the "default" button on the edit project page will set up the config to some working condition
__________________
http://www.it4um.com
arhi is offline   Reply With Quote
Old 19th May 2008, 10:33 AM   (permalink)
Default

Well i have looked in the datasheet and couldnt say i could find (a list) of config bits. All i did find was the OSC bit(s)
__________________
Simplicity rules

Good enought - its perfect ??

2 Gig of free online backup space

Are you a Chemist?
Kryten is offline   Reply With Quote
Old 19th May 2008, 11:03 AM   (permalink)
Default

Quote:
Originally Posted by Kryten View Post
Well i have looked in the datasheet and couldnt say i could find (a list) of config bits. All i did find was the OSC bit(s)
Do not get me wrong, I hate the whole "config bit" thing with uC's .. still struggle with some questions about it .. as for the 4550 .. pages 288-299 in pdf document explain every bit.

I also understand your confusion as MikroC keep the name of the config register, not the bit itself, it has "config words" that are "trouble" .. I personally go trough doc, set up the value of every bit and then "turn on the appropriate combo" in MikroC ... In my prev post I wrote mikroC keep "bit's" .. that is not true .. it keep the name of registers, and offer some "config words" that I actually do not get at all .. I only look at the hex values. So again, the only way to do it properly is trough datasheet, the way mikroC offer those words IMHO only confuses people .. but, I read that they are now thinking about making cli compiler (linux version too) so this might change...
__________________
http://www.it4um.com
arhi is offline   Reply With Quote
Old 19th May 2008, 11:06 AM   (permalink)
Default

Ahh ok thanks for that (im a bit blushed here im sitting and checking out pages 288 trough 299 in the datasheet)
__________________
Simplicity rules

Good enought - its perfect ??

2 Gig of free online backup space

Are you a Chemist?
Kryten is offline   Reply With Quote
Old 19th May 2008, 11:15 AM   (permalink)
Default

Quote:
Originally Posted by Kryten View Post
Ahh ok thanks for that (im a bit blushed here im sitting and checking out pages 288 trough 299 in the datasheet)
no worries, btw, if you find a way to "directly" setup those config reg's (skipping the ugly config_word bs from mikroC), please share
__________________
http://www.it4um.com
arhi is offline   Reply With Quote
Old 19th May 2008, 11:38 AM   (permalink)
Default

You could always just look at:
"C:\Program Files\Microchip\MPASM Suite\P18F4550.INC"

I usually look there for a listing...
AtomSoft is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
help programming 18f4431 thiru_electrifiers Micro Controllers 13 12th April 2008 06:11 AM
RS232 Converter e.chain Micro Controllers 0 6th October 2007 06:19 PM
Easiest/Cheapest way to snoop I2C traffic? toodles Micro Controllers 22 22nd August 2007 12:19 PM
need help modifying some pic ASM code justDIY Micro Controllers 17 16th July 2007 11:41 AM
Using a PIC to emulate a PSX controller toodles Micro Controllers 10 30th June 2007 08:17 AM



All times are GMT. The time now is 11:02 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.