yes, it made sense.
Thanks! That worked
Correction When I run the code it says coef_0 = 16 not 17
I'm using: GCASM List File (GCBASIC 0.99.01 2022-01-27 (Windows 64 bit) : Build 1073) with an 18F4550. I wrote this simple code: dim coef_0 as word coef_0 = FnLSL(17, 4) print coef_0 When I run the code it says coef_0 = 17. I think it should be 272. What am I doing wrong?
Does GCB support Hayes modem AT commands? I'm trying to communicate with an AS7262 Light Sensor If I send: HSerPrint"Set Gain " HSerSend AT+ATGAIN = 3 ;prints <0> HSerSend 13 HSerSend 10 I get this response: Set Gain <0> Shouldn't it respond with <3>
I changed it to this: 'UART needed for Board 1 #define UART1_Rec PORTC.7 #define UART1_TX PORTC.6 '#define USART1_BAUD_RATE 115200 '#define USART1_BLOCKING #define USART_BAUD_RATE 115200 #define USART_BLOCKING 'USART routines wait until data can be sent or received. Dir UART1_Rec In Dir UART1_TX Out 'UART needed for Board 2 #define UART2_Rec PORTa.1 #define UART2_TX PORTa.0 '#define USART2_BAUD_RATE 115200 '#define USART2_BLOCKING Dir UART2_Rec In Dir UART2_TX Out Now I see both the "UART 1", 1 and...
This my program: ;Chip Settings #chip 18F4550,48 #config PLLDIV=1, CPUDIV=OSC1_PLL2, OSC=HSPLL_HS, LVP=OFF, MCLRE=ON ;OFF '**** 'UART needed for Board 1 #define UART1_Rec PORTC.7 #define UART1_TX PORTC.6 #define USART_BAUD_RATE 115200 #define USART_BLOCKING Dir UART1_Rec In Dir UART1_TX Out 'UART needed for Board 2 #define UART2_Rec PORTa.1 #define UART2_TX PORTa.0 Dir UART2_Rec In Dir UART2_TX Out '**** Do_Again: 'This works comport = 1 HSerPrint "UART 1", 1 HSerSend 13, 1 HSerSend 10, 1 HSerSend...
This time I compiled it using GC Studio. Program compiled by GCBASIC (2025.02.15 (Windows 64 bit) : Build 1465) The results were the same: UART 1 works but UART 2 does not. Any suggestions?