Don't worry. You won't be overwhelmed.vdd said:Would it be easier for an absolute beginner to start with the 16F series? Or is it better to start with the 18F series?
I mean a beginner might be overwhelmed by so much new features the 18F series have.
peter5355 said:This is a great idea I am just starting out in Pic I have just built a project from Maplin which can program 4 chips 8P 14P 18P 28P came with Pic16F 627
I don't know if it is any good or not I feel this book can help me get me started as it is going to up to date.
Project I just built might be out of date.
Read EQU as EQUals.BTW, what does the following Equate statements mean??
TMR0 EQU 1 ;means TMR0 is file 1
STATUS EQU 3 ;means STATUS is file 3
PORTA EQU 5 ;means PORTA is file 5
ex-navy said:Thanks for the answer on the EQUals.
Is it common practice to include these statements in code?
The reason I ask is that I don't see these used often in other peoples source code. I see it in book examples and wonder if the book was just outdated and upgrades in technology do not require it anymore.
Maybe the author recommends it so as to demonstrate "proper" coding???
ex-navy said:Thanks Nigel,
So, when I use MPLAB IDE and create a project, the include file associated with the PIC I select already contains this data??
Actually the author of the book I purchased to "re-learn" teaches the reader to always include this in the header of all source code written and the book is based on the 16F84 chip. So he certainly is accustomed to the Microchip product line as he also shows how to use MPLAB IDE v6.30
ex-navy said:Thanks Eric,
Yes, I discovered that it is Equates. I did not understand at first.
Can someone also explain if I am correct in assuming the following:
Consider an LED with its cathode to ground.
It's anode is connected via a current limiting resistor on pin RA0
If I want to illuminate the LED, using assembly, I first establish PORTA as outputs by writing 8 zeroes to TRISA?
The 8 pins on PORTA correspond to pins RA7:RA0
movlw b'00000000'
movwf TRISA
I then set bit PORTA, RA0 ;illuminate LED
BSF PORTA,RA0
BufferLength equ .64
Cr equ .13
Esc equ .27
BaudRate equ .19200
ex-navy said:Yes, I just read Nigels first 5 tutorials and now see why EQU statements are important
LEDPORT EQU PORTB
LEDTRIS EQU TRISB
So, the #define statement is the same as the EQU??
#define LED1 PORTB,3
bsf LED1
;is the same as
bsf PORTB,3
No, there is still bank switching on the 18F series chips. The difference is the inclusion of the "access bit" for instructions so that you don't have to do as much bank switching as you did in the 16F and lower PICs.Pommie said:This bank switching was removed on the 18 series chips.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?