Help with PIC16F84A for Beginners

  • Thread starter Thread starter Em Jay
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on the PIC16F84A microcontroller, specifically addressing how to copy input from PORTB to all General Purpose Registers (GPRs). A user successfully accomplished this task using assembly language, despite the complexity involved. Additionally, the conversation highlights that the PIC16F series lacks built-in instructions for multiplication, division, and square root operations, suggesting alternatives like the PIC18F2450, ATMEGA 128, and MSP430 for more advanced mathematical functions.

PREREQUISITES
  • Understanding of PIC16F84A microcontroller architecture
  • Familiarity with assembly language programming
  • Basic knowledge of C programming for microcontrollers
  • Awareness of general-purpose registers (GPRs) in microcontrollers
NEXT STEPS
  • Research the capabilities of the PIC18F2450 for advanced mathematical operations
  • Learn about the ATMEGA 128 and its instruction set for multiplication and division
  • Explore the MSP430 microcontroller and its features related to floating-point operations
  • Study assembly language techniques for efficient register manipulation in microcontrollers
USEFUL FOR

Beginners in microcontroller programming, embedded systems developers, and anyone interested in low-level programming with the PIC16F84A and its alternatives.

Em Jay
Messages
15
Reaction score
0
hello

i am a beginner in pic16f84a
and i found it very exciting but there is a problem i need u to help me with


suppose that portb is input


how can i copy the input to all GPR register


and one more question
what is the best type of Microcontroler that got more instructio than pic1684a

i mean sqrt and dived and multiply


and thanks
 
Technology news on Phys.org
Yes, you should be able to read any port, or register, and write the value to any general register or memory location.

I suggest that you look into using C instead of assembly programming if you are just starting out. It'll be a lot easier to get a satisfying result...then you can dig into the assembler. In C one does something simple like RegisterX = PortB; In assembler it's a bunch of MOV's and bit tests...

I'm not sure that any of the 16F series PICs have MULtiply instructions. The 18F2450 does have an integer multiply, as do the ATMEGA 128 and MSP430 (I only know what I've used...). Higher level math is usually constructed from the simple operations so I don't think you'll find a Square Root instruction on any processor chip. You are also unlikely to find any Floating Point math on chips at this level -- but I could be wrong because I avoid FP whenever possible.
 
thanks man

i know that c is much easier but i don't have a choice it's my doctor order to start
with assembly to know exactly what is going on in the device

just to make the story of registers familiar
but

if u know any type
that has Multiply divide and sqrt

i will be very great full and a bout my question i did it

i copy the input to all GPR
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
6
Views
919
Replies
8
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 2 ·
Replies
2
Views
7K
Replies
6
Views
4K
  • · Replies 30 ·
2
Replies
30
Views
6K