Hi, I'm a newbies on pic microcontroller, I want to use pic 16F88 with his internal oscillator but I don't know what are registers may I configure! thanks!
Welcome to Bit forums. Moving this to Electronics section of Modding. Confusing system we have. Check the Useful Links on PICs, may get you going.
hi what programming language you use ? one way is to check the header file for that PIC you got in assembly its .INC file and in C it is .h file all the config fuses should be somewhere in these files there are a lot of other stuff on these files. what you want is this "INTRC_IO" which activate the internal oscillator and give you IO on the pins which a normal crystal oscillator would be. i use CCS i would just write . . #FUSES INTRC_IO . . hope that helps
You want to be setting bits in the config word to use the internal oscillator. These bits cannot be set in realtime so you must use the __CONFIG directive to assign them. See "Special Features of the CPU" section in the datasheet.
Thanks for your answers, I use Picc compiler, in datasheet of pic16F88, I see OSCCON register, and for example if I want to use 8Mhz, I must configure this to OSCCON = 0b01110000, so my question is beyond this register, does exist other register to be configured? I don't need clock signal output. Thanks!
in C setting up the oscillator and many other MCU peripherals dosent require setting values to registers. there are function that does the work for you. i haven't used PICC before is it Microchip C that setup on MPLab or is it HI-tech C? regardless you should check the examples that come with the package to get an idea how its done. and as i said in CCS or PCW as it sometimes called, i setup the internal clock with no clock out this way: #FUSES INTRC_IO and i set the frequency using the delay directive #DELAY(8000000) hope that helps.
Thanks for your answers guys! Ok, if i understand, I must do _config .INTRC_IO as R6 & ... in the head of my file .c So, i find schematic of pic programmer, easy to do and cheap, connected in parallel port? my computer hasn't serial port (jdm programmer). Thanks!
If you're using a C compiler, how you set the config fuses is defined in the documentation. For C18 it's likely to be "#pragma config _INTRC_IO"
Thanks for ours advices guy! so, to configure pic microcontroller in C compiler (hi-tech) using internal oscillator, i must do: __CONFIG (INTIO & WDTDIS & BORDIS & UNPROTECT & LVPDIS & MCLRDIS & ....); and in main code: I must specify OSCCON register! Thanks!
The brown out reset is designed to hold the PIC in reset while the supply voltage is out of spec. It's designed to prevent erratic operation that would occur if the supply voltage is too low. If you look at the electrical characteristics section of the datasheet, you'll see that the device can only run at certain frequencies at certain supply voltages. You would then set the BOR parameters to ensure the device doesn't try to run when the voltage is too low.
Thanks! your advice is very important, in the future, I turn BOR enabled to prevent noise and to fix problem if supply is under the threshold. I have one question about my pic, it marks 16F88-I/P, you know what means the last I/P? So, for my pic programmer(serial port), I want to use this schema but I don't know if it works: Tx ---[4k7]----------MCLR/Vpp RTS---[4k7]----------RB7 DTR---[4k7]----------RB6 CTS------------------RB6 GND------------------Vss +12v----[7805]-------Vdd An another schematic is: http://www.hiboox.com/lang-fr/image.php?img=0uhd40as.jpg
I/P means that it's of industrial specification (-40 to 85C) in a PDIP package (skinny dual in line). I'd avoid that programming schematic, it may work, but it certainly isn't adhering to the electrical specifications of the PIC - the serial port swings -12 to +12V. Those 4k7 resistors will limit current through the protection diodes to less than 1mA, but it isn't optimal My advice, especially if it's the first device you're programming is to shell out the cash for a programmer you know is going to work. The Microchip PICkit2 is affordable and flexible for most users and should eliminate some uncertainty when trying to get your first PIC to work. If you really don't want to spend the £20 or so, take a look on ebay for PICkit2 or ICD2 clones. You may find some for less than a tenner. If that's too much, but you still have a standard serial port on your PC (not a usb to serial converter) then try building the JDM programmer.
Ok! thanks guy! I will try to find PICkit2 or ICD2 clone in ebay website, if it isn't expensive! so tomorrow, i will try the diagram of top, I keep you informed results. Thanks again !