spampaulswork at @spam@hotmail.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
See also:
| file: /Techref/microchip/math/radix/a2b-2d8b-pw.htm, 1KB, , updated: 2003/10/21 17:36, local time: 2012/2/9 23:31,
38.107.179.232:LOG IN |
| ©2012 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://www.piclist.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? |
| piclist.com members can LOGIN to post questions, add public or private comments, links or even new pages(!). To start, fill out the form. |
|
Ubicom SX18 thru SX52, PIC 16c5X compatibile, 50 to 75 MIPS microcontrollers! Now US customers can buy the Excellent SXDev from SXList.com for $150 + $15 import fee + s&h (~ $180 total+tax in CA) |
.