Menu

Release Candidate RC36

Anobium
2021-01-03
2021-01-03
  • Anobium

    Anobium - 2021-01-03

    Lots of changes - specifics are as follows from Release Candidate 34 are:

    RC35 was a private test release.

    But, the major update? The addition of support for the 18FxxQ41 chip .

    910   New                 Minor update to DEF file format: PIC,AVR,PPS,ChipFamily [1156]
    911   New                 Add PICInfo to installer, removed GCGB icon from desktop and improved the installation process.
    912   Fix                 Updated chip datas files for SelfWrite and PROGMEM pages size for 18F chips.[1157]
    @RC36
    913   Fix                 Updated USART. Incorrect values in ALL previous versions[1158,1159]
    914   New                 Added 18FxxQ41 support.[1160,1161,1163]
                              Updated to HWIC2C, SAF, EEPROM, compiler
                              Added 18FxxQ41 demos.
    915   New     DAT         Added new INC file generation tool.
    916   New     Compiler    Change to support line continuation[1162]
    917   fix     Timer       Correct Timer constants for AVRs[1164]
    

    See the release candidate folder here: https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/

     
  • stan cartwright

    stan cartwright - 2021-01-03

    I just installed it over rc35 and testing same stuff as with earlier versions.
    Nice one.
    Got to check lgt..again..but fun.
    It's now public?

    edit ie was lgt private before and github source code?
    cheers

     

    Last edit: stan cartwright 2021-01-03
    • Anobium

      Anobium - 2021-01-03

      Re LGT I think so. I have asked Frank to review the RC36 generated code but it looks very good.

      I have two types of LGT boards here. It would be good to have a full review of all the board out there.

       
  • stan cartwright

    stan cartwright - 2021-01-03

    You guys have done fine work. Cheers.
    I knew some rc was personal for dev but hope lgt gets more users.
    lots of cleverer than me people out there to help.
    I got 328p code that works with lgt328.
    I'm trying a "scope" with a 328p frequency indicator..by kent or wroth.
    Surprised to see how interrupts work the same.
    in fact it's not implied they would work at all...well they do so there's no magic for lgt.

    they are cheap as genuine clone arduino :)
    Then I thought what's the point of the double speed. I can only think of graphics.
    The displays may not run faster but the trig and maths might show an improvement..
    anyway thanks for the effort guys, it's been interesting.
    There must be other speed applications.
    more testers needed imho

     
  • stan cartwright

    stan cartwright - 2021-01-03

    This code once worked but now no frequency.
    It's old but sure it worked before on mega328

    ;display repetative wave forms on ILI9341 display with vectors
    #chip LGT8F328P,16 ;#chip mega328p,16
    #option explicit
    #include <LGT8F328p.h >
    #include <glcd.h>
    ;#include <uno_mega328p.h >
    
        #define GLCD_TYPE GLCD_TYPE_ILI9341
    
        'Pin mappings for SPI - this GLCD driver supports Hardware SPI and Software SPI
        #define GLCD_DC       DIGITAL_8         ' Data command line
        #define GLCD_CS       DIGITAL_10          ' Chip select line
        #define GLCD_RESET    DIGITAL_9         ' Reset line
        #define GLCD_DI       DIGITAL_12          ' Data in | MISO    - Not used therefore not really required
        #define GLCD_DO       DIGITAL_11          ' Data out | MOSI
        #define GLCD_SCK      DIGITAL_13          ' Clock Line
    
        #define ILI9341_HardwareSPI    ' remove/comment out if you want to use software SPI.
    
    
        'GLCD selected extension font set. ASCII characters 31-254, the extended font uses 1358 bytes of program memory
        #define GLCD_EXTENDEDFONTSET1
        GLCDfntDefaultsize = 1
    
        'GLCDCLS  supports GLCDBackground as default
        'GLCDCLS  also support passing color parameter.
        'GLCDCLS [color]
        GLCDRotate ( Landscape_rev )     ' optionally you can rotate the screen.
    
    ;
    dir portc.0 in
    dim volt as word
    dim volt2 as word
    dim ptr1 as word
    dim ptr2 as word
    dim buffer1 (60)
    dim buffer2 (60)
    dim xpos_new as word
    dim ypos_new as byte
    dim xpos_old as word
    dim ypos_old as byte
    dim xpos1_new as word
    dim ypos1_new as byte
    dim xpos1_old as word
    dim ypos1_old as byte
    ;
    dim number_of_timer1_overflows , number_of_1ms_interrupts , temp_timer1 as word
    number_of_1ms_interrupts = 0
    Dim Frequency as Long
    ;
    On Interrupt Timer0Overflow Call every1ms
    InitTimer0 Osc, PS_0_64
    StartTimer 0
    ;
    Inittimer1 (EXT, PRE0_1)
    On interrupt Timer1Overflow Call Counter1Overflow
    ;
    Cleartimer 1
    number_of_timer1_overflows = 0
    Starttimer 1
    
    ;
    GLCDRotate ( Portrait_Rev )
    GLCDfntDefaultsize = 3
    GLCDCLS ILI9341_BLUE
    filledbox  0,0,239,257,ILI9341_BLACK
    box  0,0,239,257,ILI9341_YELLOW
    ;
    for ptr1=1 to 60 ;read 60 samples
      volt = READAD10 (an0)
      buffer1 (ptr1)=255-(volt/4) ;fit 1024 to screen 0,0
      buffer2 (ptr1)=buffer1 (ptr1)
    next ptr1
    GLCDDrawString (0,260,"Frequency",ILI9341_YELLOW)
    ;
    do ; start of main loop
      ptr1=1
      ptr2=1
      do until ptr1=60 ;erase old screen data and redraw new
        ypos_old=buffer2 (ptr1) ;old data
        ypos_new=buffer2 (ptr1+1)
        xpos_new=ptr2+4
    ;
        ypos1_old=buffer1 (ptr1) ;new data
        ypos1_new=buffer1 (ptr1+1)
        xpos1_new=ptr2+4
    ;
        line ptr2,ypos_old+1,xpos_new,ypos_new+1,ILI9341_BLACK ;erase last data
        line ptr2,ypos1_old+1,xpos1_new,ypos1_new+1,ILI9341_cyan ;draw new data
    ;
        ptr1=ptr1+1 ;data pointer
        ptr2=ptr2+4 ;x position for start and end line x positions
      loop
    ;ploting done now redraw cursor
    line 1,128,239,128,ILI9341_GREEN ; Draw cursor
    line 119,1,119,257,ILI9341_GREEN ;after ploting
    
    ;
    for ptr1=1 to 60 ;get new samples
      volt = READAD10 (an0)
      repeat 2 ;scale 1024 bit sample to 255 pixels ie divide by 4
        set c off
        rotate volt right
      End Repeat
      buffer2 (ptr1)=buffer1 (ptr1) ;new data to old data
      buffer1 (ptr1)=255-volt ;set 0,0 top left screen and update new data
    next ptr1
    ;if 1000 1ms interrupts occurred print frequency
    if number_of_1ms_interrupts = 1000 then
      stoptimer 1
      Frequency = Frequency * 65536 + timer1
      GLCDDrawString (0,280,str(Frequency)+" Hz   ",ILI9341_white)
      clearTimer 1
      number_of_1ms_interrupts = 0
      frequency = 0
      StartTimer 1
    end if
    loop
    ;
    sub Counter1Overflow
      number_of_timer1_overflows = number_of_timer1_overflows + 1
    End Sub
    ;
    sub every1ms
      Settimer 0, 6 '1.002ms
      stoptimer 1
      temp_timer1 = timer1 ;store timer 1 value
      number_of_1ms_interrupts = number_of_1ms_interrupts + 1
      Frequency = Frequency + number_of_timer1_overflows ;total counter1 overflows
      number_of_timer1_overflows = 0 ;reset number_of_timer1_overflows for next 1ms
      Settimer 1, temp_timer1 ;restore timer 1 value
      StartTimer 1
    end sub
    
    
    ;
        'Available colors
        'ILI9341_BLACK
        'ILI9341_RED
        'ILI9341_GREEN
        'ILI9341_BLUE
        'ILI9341_WHITE
        'ILI9341_PURPLE
        'ILI9341_YELLOW
        'ILI9341_CYAN
        'ILI9341_D_GRAY
        'ILI9341_L_GRAY
        'ILI9341_SILVER
        'ILI9341_MAROON
        'ILI9341_OLIVE
        'ILI9341_LIME
        'ILI9341_AQUA
        'ILI9341_TEAL
        'ILI9341_NAVY
        'ILI9341_FUCHSIA
    
     
    • Anobium

      Anobium - 2021-01-03

      I could not hope to debug this.

      So, try software SPI and just gat the basics working to validate the connections. Then, restore the complex code.

       
  • stan cartwright

    stan cartwright - 2021-01-03

    I changed it back to 338p and same. It's 3 years old. It should look like https://www.youtube.com/watch?v=hhTC8z1GIaI.
    I don't organise my code well.
    It was by kent or wroth and seemed cool at the time.
    reinvent someone else's wheel but understand it not just copy and paste.

     
  • stan cartwright

    stan cartwright - 2021-01-03

    This was the code but I think I could rewrite it for 328 as interrupts seem same as lgt.
    It looks simple and now a bit dated.

    dim number_of_timer1_overflows , number_of_1ms_interrupts , temp_timer1 as word
    number_of_1ms_interrupts = 0
    Dim Frequency as Long
    ;
    On Interrupt Timer0Overflow Call every1ms
    InitTimer0 Osc, PS_0_64
    StartTimer 0
    ;
    Inittimer1 (EXT, PRE0_1)
    On interrupt Timer1Overflow Call Counter1Overflow
    ;code by not me
    Cleartimer 1
    number_of_timer1_overflows = 0
    Starttimer 1
    do
    ;your code
    print "frequency=" + frequency + "  "
    loop
    ;
    sub Counter1Overflow
      number_of_timer1_overflows = number_of_timer1_overflows + 1
    End Sub
    ;
    sub every1ms
      Settimer 0, 6 '1.002ms
      stoptimer 1
      temp_timer1 = timer1 ;store timer 1 value
      number_of_1ms_interrupts = number_of_1ms_interrupts + 1
      Frequency = Frequency + number_of_timer1_overflows ;total counter1 overflows
      number_of_timer1_overflows = 0 ;reset number_of_timer1_overflows for next 1ms
      Settimer 1, temp_timer1 ;restore timer 1 value
      StartTimer 1
    end sub
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.