I am on that list with you. But I don't agree with the useful part. You already know the most useful language - PBP. The rest can only make pretty pictures and parse text.![]()
I am on that list with you. But I don't agree with the useful part. You already know the most useful language - PBP. The rest can only make pretty pictures and parse text.![]()
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
I highly dislike the method of trying to initialize ALL the registers at the top of your program.
Unless you know EVERYTHING about that chip, many of them get initialized incorrectly.
This had led to more problems than any other issue.
With the exception of comparators on the older chips ... Everything is turned OFF at power-up.
All you have to do is turn ON the things you want to use.
Don't try to turn everything off, they already are.
Now the first thing people will say is ...
Then why do I have to turn off analog pins with ADCON1 or ANSELx?
It's because you aren't turning the Analog functions OFF, you are turning the Digital Inputs ON.
Analog inputs are always ON, even when the Digital Input is enabled.
So just concentrate on what you want the chip to do, not what you don't want it to do.
DT
Wise words Darrell. I will keep that in mind.
But I still think it would be nice if Microchip could add a simple chart showing the port defaults to their data sheets. It's the difference between implicit information and being explicit which is what the spec shhe should be all about
"Do or do not, there is no try" Yoda
That information is already in the datasheet.
For the 16F916 you are using, look at Table 2-1 (page 17)
It has the POR/BOR and "Other" reset defaults for every register.
DT
Yeah, but that table does not explicitly state the POR for each pin. It just lists what each pin CAN DO, not what it wakes up to without tweaking registers.
I want a clear explicit list of the defaults, it would sure make my life simpler!
"Do or do not, there is no try" Yoda
The two columns on the right of that table show the Power-On state of every bit in every register.
The registers control the peripherals.
The peripherals are multiplexed with the Pins.
The peripherals are all OFF (except for comparators).
The pins are tri-stated (OFF).
What else do you need?
Last edited by Darrel Taylor; - 20th October 2011 at 19:32.
DT
I guess what I want is something more readable and less abstract. Sure that chart contains the info - but not in a very user friendly format. Maybe you (and others) find that chart fills your needs, it just does not work for me. But I will make a point of trying to study this chart in future.
"Do or do not, there is no try" Yoda
So my header wizard should only flip the bits needed that are not correct on POR. Got it. Then will you like it?
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Tekart, I by no means ment to hinder your rant, ranting is fun sometimes. I do find it kinda funny that this thread shows very clearly what my wife has been saying for years - I don't need you to solve the problem, just listen to it!!
So here you started ranting for what was clearly something very annoing for you, Charles jumped in with how he hate it, and how he deals with it. I threw in my 2 cents, but with more advice on how I deal with it. Then Darrel comes along and points out where the information you seek is located on the DS.
I shudder to suggest this, but I can ALMOST see my wifes point (not admiting she ever has one mind you)
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Bookmarks