PDA

View Full Version : PIC16F777 - setup



orjon1
- 1st June 2011, 22:23
Hi All,

I hope someone can end these hours of frustration. I try very hard to find relevant threads before adding my problems to the list, but I am at a loss;

I'm trying to use a PIC16F777, with three HPWM and all other pins set to digital I/O's.

It's the config registers that get me - I've read the datasheet, but just don't understand how to translate that to PBP!

Thanks!

Darrel Taylor
- 2nd June 2011, 03:38
543 ERROR! :)

http://www.picbasic.co.uk/forum/showthread.php?t=543

mister_e
- 2nd June 2011, 04:20
I think it's more about CCP register than config fuses.

Sure enough, there's code example in here showing how to use the three channels.

mister_e
- 2nd June 2011, 04:39
http://www.picbasic.co.uk/forum/showthread.php?t=1770

orjon1
- 2nd June 2011, 16:36
543 ERROR! :)

http://www.picbasic.co.uk/forum/showthread.php?t=543

Thanks Darrel,

I have been through this - but it's still not clear to me;

The files in my assembler's folder are *.epc, so not exactly what is discussed in the post you have forwarded. For instance, in my PIC16F777 file is the following;

ConfigLoc=0
ConfigBase=0x3fff
ConfigMask=0x31ff
GroupName="Oscillator"
GroupMask=0x0013
ItemName="EXTRC ClockOut"
ItemValue=0x0013
ItemName="EXTRC"
ItemValue=0x0012
ItemName="INTRC ClockOut"
ItemValue=0x0011
ItemName="INTRC"
ItemValue=0x0010
ItemName="EC"
ItemValue=0x0003
ItemName="HS"
ItemValue=0x0002
ItemName="XT"
ItemValue=0x0001
ItemName="LP"
ItemValue=0x0000

I assume the "group mask" is the setting used if not otherwise defined. I do not understand how to change these in the @ define statement. Thanks for your help!

Darrel Taylor
- 2nd June 2011, 17:15
The .epc files are part of the melabs programmer folder.
Those are for the epic, U2 and field programmers only, they have nothing to do with your PicBasic Pro program.

The assembler is in
c:\program files\microchip\mpasm suite - 32-bit systems
c:\program files (x86)\microchip\mpasm suite - 64-bit systems

orjon1
- 2nd June 2011, 20:17
Indeed!

Many many thanks guys!