User Activity

  • Posted a comment on discussion Help on GCBASIC

    After I sent the above, the ultrasonic sensor stopped working. Further troubleshooting showed that I need to add this to my code: comport = 1 Now everything is working. In the help file under HSerReceive there are the following statements which seem contradictory. "comport = 1 '(1|2|3|4|5)Not needed unless using multiple comports in use" I'm using Port C.7 for UART_Rec and PortC.6 for UART_TX (18F4550). Only one comport. Since it is not needed why do I need it? "The subroutine HSerReceive can get...

  • Posted a comment on discussion Help on GCBASIC

    I found a solution to the above problem. I changed from 48 MHz to 8 MHz. BUT I also had to change this: HSerReceive Frame_Header HSerReceive Data_MSB HSerReceive Data_LSB HSerReceive Check_Sum to this: HSerReceive xx ; xx and yy are dummy bytes HSerReceive yy HSerReceive Frame_Header HSerReceive Data_MSB HSerReceive Data_LSB HSerReceive Check_Sum I don't understand why I needed to read xx and yy to make it work. The data sheet does not require them.

  • Posted a comment on discussion Help on GCBASIC

    I just added this to my program #define CHECK_USART_BAUD_RATE When I compile it I get this: Error: Big error in baudrate - percentage error = 75 @ 16800

  • Posted a comment on discussion Help on GCBASIC

    Are you getting LCD display? The 18F4550 shows the 10 for Data_MSB, 10 for Data_LSB, 10 for Check_Sum and 2570 for Total_Distance on the LCD. Does serial sent work? This ultrasonic sensor responds with out being sent any commands. So, I tried this UART controlled Bluetooth device https://www.sparkfun.com/products/23287 With this device the 18F4550 sent and received data correctly i.e, both the LCD and logic analyzer read the data. I was able to send data from my cell phone and see it on the LC D...

  • Posted a comment on discussion Help on GCBASIC

    I'm using a 18F4550 with Great Cow BASIC (0.99.01 2022-01-27 (Windows 64 bit) : Build 1073). I'm working with this ultrasonic sensor https://www.adafruit.com/product/4665 I wrote this code: ;Chip Settings #chip 18F4550,48 #config PLLDIV=1, CPUDIV=OSC1_PLL2, OSC=HSPLL_HS, LVP=OFF, MCLRE=ON ;OFF ;Defines (Constants) #define LCD_IO 2 #define LCD_CB PORTE.1 #define LCD_DB PORTE.0 '********** #define UART_Rec PORTC.7 ;Data FROM DYP-A01-V2.0 #define UART_TX PORTC.6 ;Data TO YP-A01-V2.0 #define USART_BAUD_RATE...

  • Posted a comment on discussion Help on GCBASIC

    Thanks!

  • Posted a comment on discussion Help on GCBASIC

    I'm using Great Cow BASIC (0.99.01 2022-01-27 (Windows 64 bit) : Build 1073). I wrote this code: ;Chip Settings chip 18F4550,48 config PLLDIV=1, CPUDIV=OSC1_PLL2, OSC=HSPLL_HS, LVP=OFF, MCLRE=ON ;OFF dim Bz as long dim Z_Total as long dim TwoCompliment, RawWordValueINT as integer dim Z_Total_Comp as integer wait 100 ms '********** Twos_Complement_SUB (Z_Total) Z_Total_Comp = TwoCompliment Bz = 100000 * Abs(Z_Total_Comp) Bz = Bz / 65536 Bz = Bz * 160 ;160 if BR = 80 mT. 80 if BR = 40 mT. '**********...

  • Posted a comment on discussion Help on GCBASIC

    Thanks!

View All

Personal Data

Username:
whatpic
Joined:
2011-03-19 16:59:31
Location:
United States / EDT
Gender:
Male

Projects

This is a list of open source software projects that MBB is associated with:

  • Project Logo GCBASIC   Last Updated:

Personal Tools