Help with PIC16F84A for Beginners

  • Thread starter Thread starter Em Jay
  • Start date Start date
AI Thread Summary
The discussion centers around a beginner's experience with the PIC16F84A microcontroller, specifically regarding how to copy input from Port B to all General Purpose Registers (GPR). The participant successfully accomplished this task. They also inquired about microcontrollers that offer more advanced mathematical instructions, such as multiplication, division, and square root functions. It was suggested that using C programming would simplify the process compared to assembly language, especially for beginners. However, the participant is required to learn assembly to gain a deeper understanding of the device's operations. The conversation highlights that while the PIC16F series may lack built-in multiplication instructions, other microcontrollers like the PIC18F2450 and ATMEGA 128 do include such features. Overall, the discussion emphasizes the importance of foundational knowledge in assembly programming for better comprehension of microcontroller functionality.
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
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top