SPAMpaulsworkTakeThisOuT at SPAMhotmail.com
here are a couple of BIN to ASCII converters I wrote, might be useful.;********************************************************************** ; Routine:ASCIItoBIN ; Input Registers:ASCII_MSW, ASCII_LSW ; Output Registers: BUFFER ; Internal Registers:None ; CALLS:None ; Function: Receives two ASCII bytes in ASCII_MSW and ASCII_LSW registers. ; These two bytes are converted into 1 byte binary, returned from this ; routine in register BUFFER ;********************************************************************** ASCIItoBIN MOVLW 65 ;convert ascii into MSW address SUBWF ASCII_MSW,W MOVLW 48 BTFSC StatusREG,C MOVLW 55 SUBWF ASCII_MSW,W ANDLW b'00001111' MOVWF BUFFER ;Save result of the upper nibble SWAPF BUFFER,1 MOVLW 65 ;convert ascii into LSW address SUBWF ASCII_LSW,W MOVLW 48 BTFSC StatusREG,C MOVLW 55 SUBWF ASCII_LSW,W ANDLW b'00001111' ;Get result of lower nibble IORWF BUFFER,1 ;and put final result in BUFFER for output retlw 0
file: /Techref/microchip/math/radix/a2b-2d8b-pw.htm, 1KB, , updated: 2003/10/21 17:36, local time: 2024/11/22 01:23,
18.190.160.6:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/techref/microchip/math/radix/a2b-2d8b-pw.htm"> PIC Microcontoller Radix Math Method ASCII hexadecimal to Binary</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.