'the slightly smarter newbie'
Jonathan M. Newport
Well, I suppose I'm not stupid anymore seeing as I was told several times
to quit calling myself that. But, I still have more questions. I did
download the 16c84 data sheets, the only thing is, I CAN"T MAKE HEADS OR
TAILS OF IT! I uderstand SOME of the hardware stuff, but the commands
thoughly confuse me. Now, I would like to know a few vocab words. I keep
thinking of a stack as something like what is on my RPN calculator (hp
48s or g) is it the same, is this where you perform all the calculations?
Also, what are shift registers? and, I know I should know this and I
don't, but, interupts? and banks? well, anyway, I thought about obtaing a
pre-built programing board, but since everyone on this list has convinced
me to use the 16c84/16f84 I think I will buid my own. And when I do, does
anyone have the pcb layout for one of those? (I have a terrible time with
those pad-per-hole prototyping boards, if anyone could give me suggestions
on this I would appreciate it too.) Yet another thing, A couple of people
told me that I could stay with Pbasic (stamp language) and the pic. This
would be the
easiest way to go for me right now, even though I know I will eventually
have to learn assembly. Now When I do the command Alt-I it breings up a
comand that lets me choose 16c58a or 93lc56 is there anyway that I can use
the 16f84 with this, and is the same hardware programing
|Jonathan M. Newport wrote:
> told me that I could stay with Pbasic (stamp language) and the pic.
> This would be the
> easiest way to go for me right now, even though I know I will
> have to learn assembly. Now When I do the command Alt-I it breings up
> a comand that lets me choose 16c58a or 93lc56 is there anyway that I can
> use the 16f84 with this, and is the same hardware programing
> methods implemented?
The page at:
http://www.dontronics.com/84.html may assist you.
Also you could send a blank message to dontronics.combasics
which may help to explain the newbie techniques for the
dilemma you are faced with.
Don McKenzie dontronics.com donhttp://www.dontronics.com
Basic Stamp Windows 95 Front End Now Available.
PicNPoke "Pacman like" Multimedia Simulator for the PIC16x84.
SimmStick(tm) Atmel & PIC proto PCB's. 30 pin Simm Module Format.
For more details, send a blank message to dontronics.cominfo
or dontronics.com or simstickdontronics.combasics
|On Sat, 11 Oct 1997 17:59:03 -0500 "Jonathan M. Newport"
<MAIL.ORION.ORG> writes: jnewport
>Well, I suppose I'm not stupid anymore seeing as I was told several
>to quit calling myself that. But, I still have more questions. I did
>download the 16c84 data sheets, the only thing is, I CAN"T MAKE HEADS
>TAILS OF IT! I uderstand SOME of the hardware stuff, but the commands
>thoughly confuse me. Now, I would like to know a few vocab words. I
>thinking of a stack as something like what is on my RPN calculator (hp
>48s or g) is it the same, is this where you perform all the
The stack in a PIC works like the one in an RPN calculator, what goes in
last comes out first. But it is not used to store data, it only stores
return addresses for CALL instructions and interrupts. When the program
is diverted by a CALL or interrupt, the address of the instruction that
would have been executed next is stored on the stack. The RETURN
instruction removes the address from the top of the stack and causes the
PIC to resume the program where it left off.
This is all the stack can do. It operates automatically, and only
automatically. There is no way to store data in it. The beginning
programmer need not worry about it other than realize that the stack can
only hold 8 entries, so the PIC will get lost if the program CALLs more
than 8 levels deep. Calling more than 8 levels deep is not something a
beginning programmer is likely to do either.
>Also, what are shift registers?
A shift register holds more than one bit of data, and has a provision to
shift the bits of data it contains toward either the MSB or LSB. For
example, say a left-shifting register contains 00010, then it is given
the command to shift left. The new contents will be 0010n, where n is an
(externally supplied) new bit that can be either 0 or 1.
Notice that with n=0, the left shift multiplied the binary value of the
data in the register by 2 (from 2 to 4). Similarly, shifting to the
right divides the value by 2. This is of great utility in a lot of math
routines. Shift registers are also the primary means of converting data
from parallel to serial and back. The PIC has two software instructions
that make any data location work like an 8-bit shift register: RRF and
RLF. The difference is the direction the data shifts. The new bit is
supplied in the Carry status bit.
Don't concern yourself with these yet, until you've gotten a few programs
to work in an actual PIC. Interrupts are unnecessary in a great many PIC
applications but essential in others. They let hardware divert the
program to something that needs immediate attention.
Banks are used to increase the memory space that can be accessed by the
PIC. The problem is that the (14-bit) PIC instructions that access data
memory directly only encode a 7-bit memory address. Memory at addresses
higher than 127 (hex 7F) is not directly accessible. Enter the
bank-select bits. When these bits are set, multiples of 128 are added to
the address in the instruction (On the PIC16F84, only the RB0 bank bit is
significant. Other PICs with more than 256 bytes memory space use more
bank select bits).
For example, a MOVWF 06 will move data to port B if the bank select bit
is 0, and TRIS register B (hex 86) if the bank select bit is 1. See the
memory map in section 4 (I think). Notice that in the PIC16F84, most of
the memory space is duplicated in both banks. It doesn't matter what the
bank select bit is set to in most cases. There are vital exceptions such
as the PORT/TRIS registers, OPTION register, and EEPROM control
registers. The usual programming practice is to leave the RB0 bit set to
its reset value of 0, except during the parts of the program that need to
access a special register that is only avaialable in bank 1.
Slightly Smarter Newbie: Definitions
> I keep thinking of a stack as something
> like what is on my RPN calculator (hp 48s or g) is it the same, is
> this where you perform all the calculations?
A stack is a large pile of objects such as hay, firewood, or other
>Also, what are shift
Shift registers are people who will register you for second shift
> and, I know I should know this and I don't, but,
The things that come through the telephone when you are trying to
concentrate on writing assembly code.
Where you put the millions you make on your work as an electronics
OK OK OK I'll give you are real definition. Interrupts allow your
program to be merrily thinking about one process, then go handle
another process when an external event triggers. You can have
interrupts from several sources, depending on the processor. You can
program these to come from timer timeouts, change of voltage on a
pin, finishing an analog conversion, or other things. You have the
option of turning off any of these interrupts, or enabling them.
Say your program needs to go along blinking an LED until your user
presses a key. When a key is pressed, your program stops doing the
LED timing thing and executes some code you place at the INTERRUPT
VECTOR, which is simply the address that the processor goes to when
it sees an interrupt.
More... (looser matching)
- Last day of these posts
- In 1997
, 1998 only
- New search...