Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 28th October 2007, 07:10 PM   (permalink)
Default PIC ASM - Summation two 16 bit numbers (16f84)

Hey,

i need a pic program that sums two 16 bit numbers.

can you help me ?

thx
byrusber is offline  
Old 28th October 2007, 07:13 PM   (permalink)
Default

Check the PICList for plenty of examples, it's really pretty simple though.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 28th October 2007, 07:14 PM   (permalink)
Default

Try PICLIST....

Code:
;
        movf    Num1L,W         ;
        addwf   Num2L,W         ;
        movwf   ResultL         ;
        movf    Num1H,W         ;
        skpnc                   ;
        incf    Num1H,W         ;
        addwf   Num2H,W         ;
        movwf   ResultH         ;
;
Mike, K8LH is offline  
Old 28th October 2007, 07:25 PM   (permalink)
Default

Try PicList BRo if u dont try to find it urself u cant learn anything about it babe and if u cant do that silly program so go and kill urself byrusber
GokhaN_AntaLiYa is offline  
Old 28th October 2007, 07:27 PM   (permalink)
Default

Thank you very much

im new here and new to pic programming .. so couldnt knew where to search about this program

Do you mean "http://www.piclist.com" ?
byrusber is offline  
Old 28th October 2007, 07:28 PM   (permalink)
Default

Quote:
Originally Posted by GokhaN_AntaLiYa
Try PicList BRo if u dont try to find it urself u cant learn anything about it babe and if u cant do that silly program so go and kill urself byrusber



byrusber is offline  
Old 28th October 2007, 07:28 PM   (permalink)
Default

ohh man havent u ever used internet or how many times did u use internet
GokhaN_AntaLiYa is offline  
Old 28th October 2007, 07:29 PM   (permalink)
Default

i think u havent ever heard about GOOGLE haha
GokhaN_AntaLiYa is offline  
Old 28th October 2007, 07:33 PM   (permalink)
Default

Im not going to go in trouble with you man

I really want to learn pic, thats why im here
byrusber is offline  
Old 28th October 2007, 07:34 PM   (permalink)
Default

lol sure u cant try to do that man=D
and i thought u have never learnt it really
GokhaN_AntaLiYa is offline  
Old 28th October 2007, 09:41 PM   (permalink)
Default

Code:
   Movf       num1l, w
   Addwf     num2l, f
   Movf       num1h, w
   Btfsc      _c
   Incfsz     num1h, w
   Addwf     num2h, f
This is from http://ww1.microchip.com/downloads/e...otes/00617.pdf

The last 4 linkes of that can be repeated as many times as wanted for longer number.

Also PIC16F627 does more than a 16F84 and costs less
Diver300 is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
PIC16F877A TX data to PC via serial cable derrick826 Micro Controllers 21 8th October 2007 02:28 PM
RS232 Converter e.chain Micro Controllers 0 6th October 2007 07:19 PM



All times are GMT. The time now is 09:13 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker