Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

simple maths

Status
Not open for further replies.

trennonix

New Member
Hello everybody,
I'm programming a pic in assembly,

and i want to substract one value from another, but of them are situated in general purpose registers, so how do i get one of those values into W???

when i try
movlw var,
W will have the value of the address of the register
 
Which PIC, the 18F have a proper subtract instruction, the 16F have a funky one.

The movlw instruction will move a literal into W
**broken link removed**
 
aaaaaaaahhh, thanks alot, i didn't even know that this function existed, i was limited to
movwf and movlw

btw, blueroomelectronics, i'm using a 16f
 
thanks blueroomelectronics, i knew that, i just wanted to get a value from a register to W.

The movwf worked just fine :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top