Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

16F28 convert 2 16F818

Status
Not open for further replies.

TKS

New Member
can anyone tell me how to search for the right config words..???
nigel site says:
__config 0x3D18 ==> 11110100011000 in bin...


i have a F818 want to set it at 32khz..internal oscmode
the datasheet says 7=0 654=000..(32Khz) 3=0

i have no idea how to set this can anyone give me a good site for this kind of newbie things.....

TKS
 
TKS said:
can anyone tell me how to search for the right config words..???
nigel site says:
__config 0x3D18 ==> 11110100011000 in bin...


i have a F818 want to set it at 32khz..internal oscmode
the datasheet says 7=0 654=000..(32Khz) 3=0

i have no idea how to set this can anyone give me a good site for this kind of newbie things.....

TKS

The datasheet gives you all you need, there's a page which gives a bit representation of the config word - simply select which bits need to be high, and which need to be low, from the descriptions provided.
 
grr..

can you tell me what the value has to be i'm already trying to convert your values whit the datasheets..

but i stuck up and don't know.. how to do it..

if you want me to do a favour..

you tell me in 6 steps how to do it and where to look at..

then i will know it for eternity..

TKS
 
A good practice in programming is to avoid using "magic numbers" as constants. That is, avoid using statements like "__config 0x3D18" because you will have to go back to the datasheet to decode what the values mean. In addition, you will have problems transporting you code across different devices.

Here is a sample of the code I would recommend:

Code:
     LIST          P = PIC16F818
     INCLUDE      "P16F818.INC"
;
     __CONFIG _MCLR_OFF & _LVP_OFF & _INTRC_IO
     END

To configure for 32Khz operation you would also have to initialize the OSCCON register.
 
well i don't bother if i should decode it..i use very fast the same chips.

but i cant read de 0x09878DD

and i don't untherstand them
i'm gonna search for a good tutorial..

nigels are very good impressive but i miss the base..

for examplpe how to make the include file..???
and what in it..

i have now bought 2 books..(pic in practise) and 1 whit AVR Controllers

TKS
 
well i don't bother if i should decode it..i use very fast the same chips.

Right. You don't bother because you can easily ask around. Maybe next time nobody will be around to answer them for you.

You use the same chips? How come you're changing from 16F28 to 16F818 now?

for examplpe how to make the include file..???

The include files are supplied by Microchip if you install their MPLAB IDE development system. There's one for every device type they have. They can be found in the "\Program Files\MPLAB IDE\MCHIP_Tools" directory.
 
jeje,

i do this to be able to compare the nigel programs..

whit my owns but i only have in the moment

F818

of 877a

TKS
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top