# Complete and concise reference/tutorial

Status
Not open for further replies.

#### Nick'

##### New Member
I am new to pic assembly programming. I have read a few tutorials and found out that they are not very conprehensive. They just tell us to do this and that without explaining what they are.

Let me give you an example,
Code:
__config 0x3D18			;sets the configuration settings
;(oscillator type etc.)

org	0x0000			;org sets the origin, 0x0000 for the 16F628,
;this is where the program starts running
movlw	0x07
movwf	CMCON			;turn comparators off (make it like a 16F84)

bsf 	STATUS,		RP0	;select bank 1
movlw 	b'00000000'		;set PortB all outputs
movwf 	TRISB
movwf	TRISA			;set PortA all outputs
bcf	STATUS,		RP0	;select bank 0

They never tell what RP0, CMCON are. And some others. What i need now is a good book or websites explaining all these minor things. This is because i don't just want to follow the tutorials, but i want to go deeper. I hope you guys know what i mean. I would appreciate if anyone could tell any websites, books or manuals(maybe from microcip) to me. Thank you.

#### Nigel Goodwin

##### Super Moderator
You should read the datasheets, which explain what you need to know. But if you want more basic tutorials, then check the sticky at the top of this forum for various others.

#### Pommie

##### Well-Known Member
Any tutorial that uses numbers rather than the labels supplied by Microchip should be avoided. For some reason, Nigel thinks that having __config 0x1234 is acceptable but having incf 5,1 isn't. Either numbers are good or not.

Sorry, this is a long time bugbear of mine and I think if Nigel is going to carry on promoting his tutorials he should correct them.

Mike.
P.S. the gooligum tutorials are superb.

Last edited:

#### Mike - K8LH

##### Well-Known Member
I agree on this particular point too. Nigel has produced a wonderful tutorial and he should be commended for the effort that's gone into it, but, his use of a numeric constant for the config' fuses seems (to me) to be a step backwards.

Mike

Last edited:

#### be80be

##### Well-Known Member
It is hard to use
__config 0x3D18
So easy to go wrong.

Nick you can learn a lot with just the MPLAB Help and always read the datasheet

Open mplab and go to help topics mpasm and have fun
here a pic

#### Attachments

• help.png
121 KB · Views: 72

#### Nick'

##### New Member
Datasheet? You mean the MPLAB datasheet?

#### Nick'

##### New Member
Thanks a lot guys, i really appreciate those.

#### AllVol

##### New Member
Thanks a lot guys, i really appreciate those.

Did you get your PICkit 2 going okay?

Follow be80be's advise on the data sheets. That's where the knowledge is.

#### UTMonkey

##### New Member
I am probably showing my age a bit here, but even now I marvel at the fact of how much information is out there on the internet just a few clicks away. How on earth did I manage before?

But I would impress on you as with any kind of research (even if you think you have found the definitive source) to compare with other sources - its the internet way.

#### be80be

##### Well-Known Member
I am probably showing my age a bit here, but even now I marvel at the fact of how much information is out there on the internet just a few clicks away. How on earth did I manage before?

But I would impress on you as with any kind of research (even if you think you have found the definitive source) to compare with other sources - its the internet way.

That's for sure with the internet you may just find them sources where junk but when you put it all together you find what you need to make it work.
Never get in a big hurry you'll miss what you need to know.
Like the data sheet read it two times or you'll miss what your looking for

#### AllVol

##### New Member
But I would impress on you as with any kind of research (even if you think you have found the definitive source) to compare with other sources - its the internet way.

It was also 'the way' with my Senior English teacher in Hgh School a half-century ago. She insisted on a minimum of three references for our theme paper, which accounted for 90% of our grade for the year.

So, even way back then, multiple sources counted. LOL

Status
Not open for further replies.

Replies
0
Views
3K
Replies
3
Views
3K
Replies
5
Views
2K
Replies
6
Views
3K
Replies
7
Views
2K