Activity for MBB

  • MBB MBB posted a comment on discussion Help

    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...

  • MBB MBB posted a comment on discussion Help

    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.

  • MBB MBB posted a comment on discussion Help

    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

  • MBB MBB posted a comment on discussion Help

    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...

  • MBB MBB posted a comment on discussion Help

    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...

  • MBB MBB posted a comment on discussion Help

    Thanks!

  • MBB MBB posted a comment on discussion Help

    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. '**********...

  • MBB MBB posted a comment on discussion Help

    Thanks!

  • MBB MBB posted a comment on discussion Help

    I'm using this Game Pad board https://www.adafruit.com/product/5743 In the example code they have these lines: #define BUTTON_X 6 #define BUTTON_Y 2 #define BUTTON_A 5 #define BUTTON_B 1 #define BUTTON_SELECT 0 #define BUTTON_START 16 uint32_t button_mask = (1UL << BUTTON_X) | (1UL << BUTTON_Y) | (1UL << BUTTON_START) | (1UL << BUTTON_A) | (1UL << BUTTON_B) | (1UL << BUTTON_SELECT); Later in the code it says: uint32_t buttons = ss.digitalReadBulk(button_mask); if (! (buttons & (1UL << BUTTON_A)))...

  • MBB MBB posted a comment on discussion Help

    In the include file glcd.h, it has this code for the2in13 and 7in5 e-paper displays: Ifdef GLCD_EXTENDEDFONTSET1 then GLCDCharCol3 = GLCDCharCol3Extended1 GLCDCharCol4 = GLCDCharCol4Extended1 GLCDCharCol5 = GLCDCharCol5Extended1 GLCDCharCol6 = GLCDCharCol6Extended1 GLCDCharCol7 = GLCDCharCol7Extended1 End If The Ifdef and End If do not have the # sign in front. Is this intentional?

  • MBB MBB posted a comment on discussion Help

    Thanks!

  • MBB MBB posted a comment on discussion Help

    Does anyone know what this code does? static const uint8_t REG_CNTRL1 = 0x00; // Set enable bit WriteReg(REG_CNTRL1, 0x40 ); uint8_t val; val = ReadReg(REG_CNTRL1); val &= ~0x40; WriteReg(REG_CNTRL1, val);

  • MBB MBB posted a comment on discussion Help

    Thanks! I'll try this.

  • MBB MBB posted a comment on discussion Help

    Thanks! I tried the above suggestions but the display still remains blank. Any other suggestions?

  • MBB MBB posted a comment on discussion Help

    I now have the display Anobium mentioned above. I'm using Great Cow BASIC (1.00.00 2023-05-31 (Windows 64 bit) : Build 1249) with an 18F4550. I copied the below program from GCB Help: ;Chip Settings #chip 18F4550,48 #config PLLDIV=1, CPUDIV=OSC1_PLL2, OSC=HSPLL_HS, LVP=OFF, MCLRE=ON #include <glcd.h> #define HWSPIMode MasterFast #define GLCD_TYPE GLCD_TYPE_EPD_EPD2in13D #define GLCD_EXTENDEDFONTSET1 #define GLCD_TYPE_EPD2in13D_LOWMEMORY4_GLCD_MODE #define GLCD_OLED_FONT #define GLCD_PROTECTOVERRUN...

  • MBB MBB posted a comment on discussion Help

    Thanks!

  • MBB MBB posted a comment on discussion Help

    Thanks for the fast response. Does anyone have a link to an e-paper display that will work with GCB?

  • MBB MBB posted a comment on discussion Help

    I have this e-paper display: https://www.seeedstudio.com/Grove-Triple-Color-E-Ink-Display-2-13-p-2889.html?queryID=7ea48faba49bb43929b744ee897a794d&objectID=2889&indexName=bazaar_retailer_products This display uses a UART interface. GCB supports a SPI interface. Did I buy the wrong display or is there a way to make this work with GCB?

  • MBB MBB posted a comment on discussion Help

    Thanks!

  • MBB MBB posted a comment on discussion Help

    Are you using this device as the I2C master? I'm using the device as a slave. How does 0x40003588 relate to a 7 or 8 bit addressing? 7 bit are range 0 to 127 and 8 bit range is 0 to 255. To get the 8-bit Write/Read you shift the 7-bit I2C address left one bit. I don't know what to do with 0x88 in the base address. 0x88 = 136 decimal = b1000 1000. When I shift it left it becomes 1 0001 0000 = 272 - A word value. So, does the 0x35 become 0x36? Or do I shift the whole base 0x40003588 making it 80006B10?...

  • MBB MBB posted a comment on discussion Help

    I'm using this https://www.adafruit.com/product/4481 In the Specification it says: 6.32.8 Registers - page 491 Base address Peripheral Instance Description 0x40003000 TWIS TWIS0 Two-wire interface slave 0 0x40004000 TWIS TWIS1 Two-wire interface slave 1 '********** 6.32.8.29 ADDRESS[n] (n=0..1) - page 500 Address offset: 0x588 + (n × 0x4) TWI slave address n '********** Does the base address 0x40003000 get added to the 0x588 to create 0x40003588 for TWIS0? Since I2C uses byte size numbers, do I send...

  • MBB MBB posted a comment on discussion Help

    Thanks, I've upgraded to Build 1219.

  • MBB MBB posted a comment on discussion Help

    No error. This is what GCB says when I compile: 15:58:16 G+Stool started with parameter 'hex' -> processing C:\GCB@Syn8\G+Stools\makeHEX.bat Source-File = C:\MARTY\CowBasic\Thermal Camera MLX90640 Adafruit 4407\OR test.gcb Target-File = C:\MARTY\CowBasic\Thermal Camera MLX90640 Adafruit 4407\OR test.hex Compiler Version: 0.99.01 2022-01-27 (Windows 64 bit) : Build 1073 Program Memory: 400/16384 words (2.44%) RAM: 30/2048 bytes (1.46%) OSC: HSPLL_HS, 48Mhz (Clock source is not a primary internal oscillator....

  • MBB MBB posted a comment on discussion Help

    See attachment.

  • MBB MBB posted a comment on discussion Help

    I'm using Great Cow BASIC (0.99.01 2022-01-27 (Windows 64 bit) : Build 1073) with an 18F4550. When I write a line of code with many "OR" statements such as this: If xx = 1 OR xx = 3 OR xx = 5 OR xx = 7 OR xx = 9 OR xx = 11 OR xx = 13 OR xx = 15 OR xx = 17 OR xx = 19 OR xx = 22 OR xx = 24 OR xx = 26 OR xx = 28 OR xx = 30 OR xx = 32 then Do something End If GCB says the program compiled without errors but when I check the time stamps in File Explorer it shows that the .asm, .hex, .html, and .lst files...

  • MBB MBB posted a comment on discussion Help

    Here is the manufacturer's description of R_PUSH: With R_PUSH we refer to a register, which has exact control which bits actually are cleared - only these bits are reset where a ‘1’ is written.

  • MBB MBB posted a comment on discussion Help

    Thanks!

  • MBB MBB posted a comment on discussion Help

    I'm using an 18F4550 with version (0.99.01 2022-01-27 (Windows 64 bit) : Build 1073). The chip (TMF8820) I'm using has an image file that needs to be loaded. This image file has 2476 elements in it. In the Table the first 192 of 2476 element are shown below: Table Image_File as word 0, 128, 32, 0, 157, 0, 32, 0, 213, 32, 16, 0 215, 32, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 9, 18, 86, 52, 172, 9, 0, 0, 217, 32, 16, 0 0, 0, 0, 0, 0, 0, 0, 0, 219, 32, 16, 0 221, 32, 16, 0,...

  • MBB MBB posted a comment on discussion Help

    Thanks!

  • MBB MBB posted a comment on discussion Help

    In the data sheet downloaded from this site: https://ams.com/en/tmf8820 See pages 44 and 45 for the ENABLE register and the INT_STATUS register.

  • MBB MBB posted a comment on discussion Help

    I'm using a TMF8820 dToF chip. The data sheet uses RW, RO and R_PUSH. I know what the first two mean but does anyone know what R_PUSH means?

  • MBB MBB posted a comment on discussion Help

    Thanks! That worked.

  • MBB MBB posted a comment on discussion Help

    I'm using version 0.99.01 2022-01-27 (Windows 64 bit) : Build 1073 with an 18F4550. I am trying to concatenate bytes I read using HI2C into one long string. My code is: dim Message_Text(260) dim GPS_DataSTR as string GPS_DataSTR = Str(Message_Text(NN)) + Str(Message_Text(NN + 1)) + Str(Message_Text(NN + 2)) When I compile it I get this error message: Error: Cannot handle construct. Please simplify source Max_M10s_d.gcb (214): Error: Cannot handle variable construct. Please simplify source. What am...

  • MBB MBB posted a comment on discussion Help

    Thanks!

  • MBB MBB posted a comment on discussion Help

    Isn't an answer of 0 the wrong result? If you did divisions and kept reducing the denominator, your answer would keep increasing. For example: 10/1 = 10 10/0.1 = 100 10/0.01 = 1000 10/ 0.001 = 10000 10/0 = ? (infinity or undefined? An answer of zero seems completely wrong.

  • MBB MBB posted a comment on discussion Help

    I'm using Great Cow BASIC (0.99.01 2022-01-27 (Windows 64 bit) : Build 1073) with an 18F4550. I wrote this simple program to test how GCB responds to division by zero: dim AA as Byte dim BB as Word dim CC as Integer dim DD as Long AA = 57/0 BB = 348/0 CC = 2489/0 DD = 158052/0 locate 0, 0 print AA locate 1, 0 print BB locate 2, 0 print CC locate 3, 0 print DD '****** The program compiled without any errors or warnings. I got 0 for AA, BB, CC, and DD. Since division by 0 is undefined: Shouldn't the...

  • MBB MBB posted a comment on discussion Help

    Thanks William that solved it. Anobium, The Help file doesn't mention it but It appears that this function uses the Compass coordinate system. Is that correct? I would suggest the Help file specify if this function outputs degrees based on the Cartesian Coordinate system or the Compass coordinate system. To me, it looks like the Compass coordinate system.

  • MBB MBB posted a comment on discussion Help

    I'm using GCBASIC 0.99.01 2022-01-27 (Windows 64 bit) : Build 1073 with the 18F4550 chip. I'm trying to use this : byte_variable = atan (x_vector,y_vector) which is in #include <maths.h></maths.h> First a question: There are at least 2 coordinate systems. The Cartesian Coordinates where 0 degrees is the +X axis, 90 degrees is the +Y axis, 180 is -X axis and 270 is -Y axis. (Counter clockwise rotation from 0 degrees) The other is the Compass coordinate system where 0 degrees is the +Y axis, 90 degrees...

  • MBB MBB posted a comment on discussion Help

    I found the problem. To use this, this must be added #include <maths.h> </maths.h> The help file does not state this. You may want to add this to the help file.

  • MBB MBB posted a comment on discussion Help

    I'm using GCBASIC 0.99.01 2022-01-27 (Windows 64 bit) : Build 1073 with the 18F4550 chip. I'm trying to use this : byte_variable = atan (x_vector,y_vector) When I try to compile it I get "Error: Invalid variable name" I've changed "byte_variable" to other names but still get the same error. Why is this?

  • MBB MBB posted a comment on discussion Help

    I'm using GCB Version 0.98.07 2021-07-24 with an 18F4550. I'm using this board: https://www.robotshop.com/en/bno055-9-dof-absolute-orientation-imu-module.html which is a 9 DOF module. It uses I2C with pulse stretching. Is there anything I need to do in GCB to make the 18F4550 receive data from the pulse stretching BNO055?

  • MBB MBB posted a comment on discussion Help

    The Help file refer to Software SPI but doesn't explain how to use it. Does any one know what I must do to use Software SPI?

  • MBB MBB posted a comment on discussion Help

    I'm using this board https://www.sparkfun.com/products/15050 with GCB version 0.98.06 and an 18F4550. This board has 3 physical registers: Status Write Read It uses virtual registers to access the remaining I2C registers. This accessing of the virtual registers is described on pages 24 to 26 of this document https://cdn.sparkfun.com/assets/c/2/9/0/a/AS7265x_Datasheet.pdf and on pages 11 to 14 of this document https://cdn.sparkfun.com/assets/8/5/f/0/3/AS7265x_Design_Considerations.pdf This is all...

  • MBB MBB posted a comment on discussion Help

    Wow! So simple and yet so clever. Thanks!

  • MBB MBB posted a comment on discussion Help

    Thanks chris!

  • MBB MBB posted a comment on discussion Help

    Is there a way to indicate when a multiplication of 2 variables causes a long variable to overflow? For example: Dim xx, yy, zz as long xx = 70000 yy = 75000 zz = xx * yy ;should = 5,250,000,000 which is greater than 2^32. How would I know zz overflowed?

  • MBB MBB posted a comment on discussion Help

    Thanks to all for your help!

  • MBB MBB posted a comment on discussion Help

    I'm using an AHT20 Temperature/Humidity sensor. See page 8 of https://cdn.sparkfun.com/assets/d/2/b/e/d/AHT20.pdf The temperature section is working but I get humidity values greater than 100%. I found this code for the humidity calculation on a web site. /* Extract 20-bits of humidity data */ uint32_t reg_humidity = regs[1]; reg_humidity <<= 8; reg_humidity |= regs[2]; reg_humidity <<= 4; reg_humidity |= (regs[3] >> 4); *humidity = (reg_humidity / 1048576.0); Can anyone translate this into GCB?

  • MBB MBB posted a comment on discussion Open Discussion

    In the maths.h include file is the Atan function which is on based on Roman Black's formulae. In the comments it says: "'Any values of X and Y are usable including negative values provided 'they are between -1456 and 1456 so the 16bit multiply does not overflow." The Function uses this: Dim uxvector, uyvector, degree as Integer If this is changed to: Dim degree as Integer Dim uxvector, uyvector As Long the range increases from -1456 and 1456 to -32768 and 32767. This would allow the ArcTangent of...

  • MBB MBB posted a comment on discussion Help

    Jim, Your code worked. Thanks!

  • MBB MBB posted a comment on discussion Help

    I'll try it. Thanks for your help.

  • MBB MBB posted a comment on discussion Help

    Anobium, Thats the same statement I have under locate 1, 0. I'm trying to convert back to a decimal value.

  • MBB MBB posted a comment on discussion Help

    I'm using an 18F4550 with GCBversion 98.06. The "0000100000110010" is what My_STR = WordToBin(Input_Value) prints out when Input_Value = 2098. I just tried " Dim My_STR as string * 16" but got the same results' Here is the compilable code: ;Chip Settings #chip 18F4550,48 #config PLLDIV=1, CPUDIV=OSC1_PLL2, OSC=HSPLL_HS, LVP=OFF, MCLRE=ON ;Defines (Constants) #define LCD_IO 2 #define LCD_CB PORTE.1 #define LCD_DB PORTE.0 ' ;Defines (Constants) #define LCD_IO 2 #define LCD_CB PORTE.1 #define LCD_DB...

  • MBB MBB posted a comment on discussion Help

    I have this simple program: Dim Input_Value as word Dim My_STR as string ' Input_Value = 2098 locate 0, 0 print Input_Value ;Correctly prints out 2098 My_STR = WordToBin(Input_Value) locate 1, 0 print My_STR ;Correctly prints out 0000100000110010 which is eqivalent to 2098 locate 2, 0 print Val(My_STR) ;prints out 38330 - Shouldn't it print out the Input_Value The "print Val(My_STR)" gives an unexpected value. What am I doing wrong?

  • MBB MBB posted a comment on discussion Help

    I figured out most of this problem. The GLCD_RESET does not go directly to the GLCD. It goes to Pin 7 of the ATSAMD09D14A-MU chip that is on the GLCD board. Pin 7 which is labeled TFT_RST is an active low. I changed the HI2CSend 207 to HI2CSend 206. This puts a low on pin 7. Now all the switches cause a read out on the display EXCEPT Button B which causes the display to go white and stay white even when other buttons are pressed.

  • MBB MBB posted a comment on discussion Help

    Yes, HWI2C is working. In my original program there was more code and the "IF" statements were bigger. I changed them in the version I sent you to reduce the confusion. (the version I sent you has the same problem as the longer version) Here is what was after the HI2C READ. (All of this worked except the "GLCDPrint" statements. locate 0, 0 print Fourth_Byte print " " print ByteToBin(Fourth_Byte) locate 1, 0 print Third_Byte print " " print ByteToBin(Third_Byte) locate 2, 0 print Button_XYS print...

  • MBB MBB posted a comment on discussion Help

    Here

  • MBB MBB posted a comment on discussion Help

    The code

  • MBB MBB posted a comment on discussion Help

    I'm using this GLCD: https://learn.adafruit.com/adafruit-mini-tft-featherwing It is an ST7735R which uses SPI. When I use software with only SPI commands in it everything works great. If I use it with a circuit that uses both SPI and I2C I have problems. In the below program the first three " GLCDPrint" statements work correctly. After they print on the GLCD screen, the screen turns white and stays white. Subsequent " GLCDPrint" commands do not work. When I connect an oscilloscope to the SPI SCK...

  • MBB MBB posted a comment on discussion Help

    After working with Anobium I went from a white screen to fully functional GLCD. The operating voltage is definetly a factor with the ST7735R. At 3.3 volts I had a white screen. At 3.5 volts the GLCD started working.

  • MBB MBB posted a comment on discussion Help

    I downloaded 98.06 and my program works. I guess something did get corrupted in my 98.05. Thanks for your help!

  • MBB MBB posted a comment on discussion Help

    The above source code is good for 98.04 and bad for 98.05. To make it work for 98.05 start by removing lines 264 - 298, 224 - 234, and 95 - 97. Then you might have to remove more until it works with 98.05.

  • MBB MBB posted a comment on discussion Help

    I forgot to mention: I've added many more lines of code to the attached program since my first post. It still works with 98.04 but not 98.05. Simply removing GLCDROTATE Portrait_Rev as I did in the first post will not make it work with 98.05

  • MBB MBB posted a comment on discussion Help

    Here is my code

  • MBB MBB posted a comment on discussion Help

    I went back and forth between 98.05 and 98.04. The program works with 98.04 but not with 98.05. It appears that something changed in 98.05.

  • MBB MBB posted a comment on discussion Help

    Probably nothing. I was just responding to mkstevo's question.

  • MBB MBB posted a comment on discussion Help

    I'm using an melabs U2 programmer.

  • MBB MBB posted a comment on discussion Help

    Does GCB or Microchip limit the number of lines of code it can handle? I'm using an 18F4550 with version 98.05. When I compile my program the IDE output window shows: Compiler Version (YYYY-MM-DD): 0.98.05 2019-04-20 (Windows 32 bit) Program Memory: 1678/16384 words (10.24%) RAM: 78/2048 bytes (3.81%) Chip: 18F4550. It shows I have plenty of Program Memory and RAM remaining. It compiles without any error messages. When I look at the .lst file it shows the program ends at line 000AFA (line 2810) The...

  • MBB MBB posted a comment on discussion Help

    Thanks!

  • MBB MBB posted a comment on discussion Help

    In the Help file it say: Multiple elements on a single line separated by commas: Table TestDataSource as Integer 12, 24, 36 48, 60, 72 End Table When using the ReadTable command, what Item and Output do I use to read the 60 (second element in the second line)?. I couldn't find any information in the Help file.

  • MBB MBB posted a comment on discussion Help

    Yes I do have serial to USB TTL converter attached. I also tried withe your previous version of glcd_ discovery . The previous version prints out - new one doesn't

  • MBB MBB posted a comment on discussion Help

    With the glcd_discovery program posted above I see the GLCD_DO, GLCD_SCK, GLCD_CS, and GLCD_DC pulses but it does not print out to the serial terminal.

  • MBB MBB posted a comment on discussion Help

    Due to the design of the board I cannot get to the GLCD pins. I can only get to the pins along the edge of the board. This board does NOT use GLCD_DI. All pulse measurements below are peak to peak using TEST_PORTS.gcb With #define TestPort GLCD_SCK I see: 3.3 volt pulses on GLCD_SCK 0.4 volt pulses on GLCD_DO 3.3 volt DC level with noise on GLCD_RESET 0.02 volt pulses on GLCD_CS 0.02 volt pulses on GLCD_DC With #define TestPort GLCD_DO I see: 0.2 volt pulses on GLCD_SCK 3.3 volt pulses on GLCD_DO...

  • MBB MBB posted a comment on discussion Help

    I tried the newest ZIP. Same results as before

  • MBB MBB posted a comment on discussion Help

    Are you aware that this GLCD uses 4-wire SPI? I was looking at the ST7735R Data sheet. On page 25, figure 8.4 is the timing diagram which shows the D/CX (GLCD_DC) pulse. It seems to show a pulse that is synced with the SDA (MOSI) pulse. At the bottom of page 33 it says " D/CX is sampled when first rising edge of SCL (3-lines serial interface) or 8th rising edge of SCL (4-lines serial interface). " On the O'Scope I see GLCD_DC pulses that last for 8 clock cycles. I'm not sure if this means anythi...

  • MBB MBB posted a comment on discussion Help

    I now see the pulses on the O'Scope. The GLCD just a white background

  • MBB MBB posted a comment on discussion Help

    I missed the code in https://sourceforge.net/p/gcbasic/discussion/579126/thread/c0adbef6f9/#5dcd but now I am using it with the new ZIP you just sent. I get this warning: WARNINGs / ERRORs reported by Great Cow BASIC (if Syntax Error, doubleclick on the errormessage below) <<< Warning: 25 My setup uses a 4 MHz crystal to get the 48 MHz so I use this: ;Chip Settings for 48mhz using a 4 MHz crystal #chip 18F4550,48 #config PLLDIV=1, CPUDIV=OSC1_PLL2, OSC=HSPLL_HS, LVP=OFF, MCLRE=ON The GLCD is the...

  • MBB MBB posted a comment on discussion Help

    I tried both glcd_discovery_spi_data.gcb and New91.gcb with the 3 new glcd.h include files. I assumed that I should use this #define GLCD_TYPE GLCD_TYPE_ST7735R I get the following warning: '>>> WARNINGs / ERRORs reported by Great Cow BASIC (if Syntax Error, doubleclick on the errormessage below) <<< 'glcd.h (206): Warning: Cannot find C:\GCB@Syn5\GreatCowBasic\include\glcd_UC1601.h I get the same results as before - the GLCD display does not change.

  • MBB MBB posted a comment on discussion Help

    Here' my code

  • MBB MBB posted a comment on discussion Help

    I tried C:\GCB@Syn\GreatCowBasic\Demos\glcd_solutions\glcd_discovery_for_mcufriend_devices\glcd_discovery_spi_data.gcb I removed this line from the code: #include <uno_mega328p.h>. I don't know the equivalent file for th 18F4550.</uno_mega328p.h> I went down to 4 MHz and ran the program. At the start I see: Read Registers on GLCD device controllers with an SPI interface reg(0x0000) FF FF FF FF FF FF FF f.k reg(0x0001) FF FF FF FF FF FF FF f.k reg(0x0002) FF FF FF FF FF FF FF f.k reg(0x0003) FF FF...

  • MBB MBB posted a comment on discussion Help

    By RESET I assume you mean : #define GLCD_RESET portC.6 This goes low for about 750 usec and then about 4.7 seconds later I see the clock pulses. The Data pulses start at about 6.4 seconds after the RESET pulse. But the GLCD is the same as before. I am using the code you posted.

  • MBB MBB posted a comment on discussion Help

    On my O'Scope I see the Clock, Data, and CS pulses so the 18F4550 is sending the data. The GLCD remains a blank screen with a white background and the backlight on, i.e. the GLCD is not responding.

  • MBB MBB posted a comment on discussion Help

    Yes, the port data lines are connected. On the O'Scope I see clock and data pulses but the display is the same as before.

  • MBB MBB posted a comment on discussion Help

    I'm using this GLCD 'Adafruit Mini TFT Feather Wing 160 x 80 'https://learn.adafruit.com/adafruit-mini-tft-featherwing Here is my code: ;Chip Settings #chip 18F4550,48 #config PLLDIV=1, CPUDIV=OSC1_PLL2, OSC=HSPLL_HS, LVP=OFF, MCLRE=ON #include <glcd.h> ;Defines (Constants) #define SPI_HardwareSPI 'comment this out to make into Software SPI but, you may have to change clock lines #define GLCD_TYPE GLCD_TYPE_ST7735 #define DEFAULT_GLCDBACKGROUND 0xF800 ;0x67F0 #define ST7735TABCOLOR ST7735_MINI160x80...

  • MBB MBB posted a comment on discussion Help

    Thanks! I'll try this.

  • MBB MBB posted a comment on discussion Help

    Does ST7735.h and GLCD.h support the SPI protocol? If so, can it be made to work with a 160 x 80 Mini TFT display?

  • MBB MBB posted a comment on discussion Help

    I'm still curious why the code I wrote did not work. Any idea?

  • MBB MBB posted a comment on discussion Help

    Thanks! I'll try these.

  • MBB MBB posted a comment on discussion Help

    I'm using this RTC https://www.adafruit.com/product/3028 module. This is the data sheet https://datasheets.maximintegrated.com/en/ds/DS3231.pdf for the IC. On page 11 of the data sheet it shows the register set up. I'm having trouble with register 02h which sets up the hours. The minutes, seconds, day, and date portions are working I wrote this code to trouble shoot the hours portion: ;Chip Settings #chip 18F4550,48 #config PLLDIV=1, CPUDIV=OSC1_PLL2, OSC=HSPLL_HS, LVP=OFF, MCLRE=ON ;Defines (Constants)...

  • MBB MBB posted a comment on discussion Help

    Thanks Chris! I did misunderstand.

  • MBB MBB posted a comment on discussion Help

    I have a follow up question. The above response says: "So the resulting byte will be the equivalent of RR left shifted twice then ANDed with 0b11111100." I don't understand why the "then ANDed with 0b11111100." is needed. For example: If RR = 43 = b101011, then left shifting twice and adding 0, 0 at the end gives b10101100 =172. ANDing this with b11111100 gives: b10101100 =172 b11111100 = 252 --------------- b10101100 = 172 the same number I started with before ANDing. Did I do this correctly? Is...

  • MBB MBB posted a comment on discussion Help

    Thanks Chris! That helps

  • MBB MBB posted a comment on discussion Help

    I'm using this Magnetometer IC: https://cdn.sparkfun.com/assets/2/2/4/d/6/MLX90393-Datasheet-Melexis_revision_003.pdf On Page 17, in the Read Register row they use this terminology {A5…A0,0,0} Does anyone know what {A5…A0,0,0} means?

  • MBB MBB posted a comment on discussion Help

    Thanks for your help!

1 >