Ahh there's the popular belief, IMO the 18F is no harder to learn than a modern 16F.
The minimal need for bank switching and that RAM starts at 0x00 helps.
You also never need to worry about RMW if you use LATx
The 18F was designed with C in mind and you can even get a decent free C18 compiler.
IMO the 18F1320 is a nice 18pin starter chip, it's not as fully featured as many (no comparators, no SPI, no internal clock 4xPLL ) but it's still a great chip to start with.
Yes, it's good to have the knowledge of 14-bit core's 35 instructions. Many of the 75 instructions in 18F are similar to 16Fs'. The bank switching in PIC18 makes my life easier. When using PIC16, I always check the datasheet for the bank of that particular register (even the 'find' of pdf can be used, but it is still time consuming).
I don't know C18, even haven't used all the 75 instructions in PIC18
Yes, it's good to have the knowledge of 14-bit core's 35 instructions. Many of the 75 instructions in 18F are similar to 16Fs'. The bank switching in PIC18 makes my life easier. When using PIC16, I always check the datasheet for the bank of that particular register (even the 'find' of pdf can be used, but it is still time consuming).
I don't know C18, even haven't used all the 75 instructions in PIC18
You can use WREG right away it is defined in the .inc file, it's just another SFR in the 18F and above PICs. I got the idea from Pommies servo program (he does it with the 16F PIC using an addlw $FF sneaky)
Oh I see, thanks
I'm using the Delay part of Pommie's servo program as well. Still remember it is 8*w instruction cycle
Didn't notice WREG in 18F, seems I have to somehow modify my program especially the delay part.
if you guys did this i'd get it and make a donation regardless. i've found it a bit tricky finding pic info and making a free information book would be a really big help for all of us new people. i was deathly afraid of pics when i started so i went with a bs2. now i know how inefficient they are and how much cheaper/better pics alone are.
You should come up with a list of subjects, in relative order, then we could give suggestions on what to include.
Here are some of the things I had to learn when starting with ucontrollers.
Choosing a Crystal (and the appropriate Decoupling Capacitors)
Issues with stray capacitance on breadboards
Setting up the Internal Oscillator
Turning off unused features (like the Comparators)
Making Ports Analog/Digital
Setting up Interrupts (learning that there is no vector table on 18f and lower).
Setting up/Reading the ADC
Using an LCD(HD44780) 4bit/8bit modes
There are more, but I cant think of any more this late at night, anyways.
I also think that maybe you should try and make it more abstract, and not focus on a specific device when talking about a topic, then after the theory you could have links to source-code for specific pic devices in specific languages.
i.e. You could talk about setting up and reading from the ADC by talking about setting certain registers, then reading from certain memory locations etc.. Then you could provide asm code for 1 or 2 popular 16f's and 18f's, then some ansi C code for 16f's and 18f's.
This is an idea I have been toying with since I have started to rewrite my PIC libraries, by creating a tutorial then tacking my code on it.
If you write this book please do not make it hard to understand. I had to take a microcontroller course and I hated it because the book we used, "PIC Microcontroller: An Introduction to Software & Hardware Interfacing" is the worst book at communicating to the reader how to program a pic. The author of that book assumed too much of prior knowledge of the reader. So please make your book NOOB friendly....
If you write this book please do not make it hard to understand. I had to take a microcontroller course and I hated it because the book we used, "PIC Microcontroller: An Introduction to Software & Hardware Interfacing" is the worst book at communicating to the reader how to program a pic. The author of that book assumed too much of prior knowledge of the reader. So please make your book NOOB friendly....
Actually the 18F series PICs are easier than the 16F IMO. I thought the same thing ages ago but the 18F feels right, great compilers and the free versions of C18 & Swordfish BASIC are awesome.
Actually the 18F series PICs are easier than the 16F IMO. I thought the same thing ages ago but the 18F feels right, great compilers and the free versions of C18 & Swordfish BASIC are awesome.