Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,152,300 members, 7,815,538 topics. Date: Thursday, 02 May 2024 at 02:11 PM |
Nairaland Forum / Science/Technology / Computers / Program (1884 Views)
(1) (Reply)
Program by Yemih: 5:40pm On Oct 25, 2007 |
Pls help me change this program written in microbasic to visual basic. program usart_ay DIM TXT AS STRING[20] DIM VALU AS BYTE[3] DIM I AS BYTE dim del as char main: delay_ms(10) TRISA = 0 usart_init(9600) txt = "AT+CMGF=1" + 13 + 10 USART_WRITE_TEXT(TXT) del = "K" usart_read_text(txt,del) TXT = "AT+CPMS=" + 34 + "ME" + 34 + 13 + 10 USART_WRITE_TEXT(TXT) usart_read_text(txt,del) TXT = "AT+CNMI=2,1,0,0,0" + 13 + 10 USART_WRITE_TEXT(TXT) usart_read_text(txt,del) WAIT: DO DO LOOP UNTIL USART_DATA_READY = 1 IF USART_READ = "+" THEN DO LOOP UNTIL USART_DATA_READY = 1 IF USART_READ = "2" THEN GOTO IT END IF END IF I = USART_READ LOOP UNTIL FALSE IT: TXT = "AT+CMGL=0" + 13 + 10 USART_WRITE_TEXT(TXT) DO DO LOOP UNTIL USART_DATA_READY = 1 IF USART_READ = "#" THEN DO LOOP UNTIL USART_DATA_READY = 1 IF USART_READ = "S" THEN usart_write(65) FOR I = 0 TO 1 DO LOOP UNTIL USART_DATA_READY = 1 NEXT I VALU[2] = 2*VALU[0] + VALU[1] USART_WRITE(VALU[2]) GOTO SEE END IF END IF LOOP UNTIL FALSE SEE: I = VALU[2] - 144 IF I = 0 T SELECT CASE I CASE 0 PORTA = 0 CASE 2 PORTA.0 = 0 CASE 3 PORTA.0 = 1 CASE 4 PORTA.1 = 0 CASE 5 PORTA.1 = 1 CASE 6 PORTA.2 = 0 CASE 7 PORTA.2 = 1 CASE 8 PORTA.3 = 0 CASE 9 PORTA.3 = 1 CASE 12 PORTA = $FF END SELECT GOTO WAIT END. |
(1) (Reply)
Users Of Tiger 950v Generators? Do They Kill Laptop Batteries? / Used White Aspire One Mini Computer For Sale 25k..slightly Negotiatble. / How Do I Download Whatsapp On Apple Ipad?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6 |