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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
#chipLGT8F328P,16;#chip mega328p,16
#optionexplicit
#include<LGT8F328p.h>
#include<glcd.h>;#include <uno_mega328p.h >
#defineGLCD_TYPEGLCD_TYPE_ILI9341'Pin mappings for SPI - this GLCD driver supports Hardware SPI and Software SPI
#defineGLCD_DCDIGITAL_8' Data command line
#defineGLCD_CSDIGITAL_10' Chip select line
#defineGLCD_RESETDIGITAL_9' Reset line
#defineGLCD_DIDIGITAL_12' Data in | MISO - Not used therefore not really required
#defineGLCD_DODIGITAL_11' Data out | MOSI
#defineGLCD_SCKDIGITAL_13' Clock Line
#defineILI9341_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
#defineGLCD_EXTENDEDFONTSET1GLCDfntDefaultsize=1'GLCDCLS supports GLCDBackground as default'GLCDCLS also support passing color parameter.'GLCDCLS [color]GLCDRotate(Landscape_rev)' optionally you can rotate the screen.;dirportc.0indimvoltasworddimvolt2asworddimptr1asworddimptr2asworddimbuffer1(60)dimbuffer2(60)dimxpos_newasworddimypos_newasbytedimxpos_oldasworddimypos_oldasbytedimxpos1_newasworddimypos1_newasbytedimxpos1_oldasworddimypos1_oldasbyte;dimnumber_of_timer1_overflows , number_of_1ms_interrupts , temp_timer1aswordnumber_of_1ms_interrupts=0DimFrequencyasLong;OnInterruptTimer0OverflowCallevery1msInitTimer0Osc, PS_0_64StartTimer0;Inittimer1(EXT, PRE0_1)OninterruptTimer1OverflowCallCounter1Overflow;Cleartimer1number_of_timer1_overflows=0Starttimer1;GLCDRotate(Portrait_Rev)GLCDfntDefaultsize=3GLCDCLSILI9341_BLUEfilledbox0,0,239,257,ILI9341_BLACKbox0,0,239,257,ILI9341_YELLOW;forptr1=1to60;read 60 samplesvolt=READAD10(an0)buffer1(ptr1)=255-(volt/4);fit 1024 to screen 0,0buffer2(ptr1)=buffer1(ptr1)nextptr1GLCDDrawString(0,260,"Frequency",ILI9341_YELLOW);do; start of main loopptr1=1ptr2=1dountilptr1=60;erase old screen data and redraw newypos_old=buffer2(ptr1);old dataypos_new=buffer2(ptr1+1)xpos_new=ptr2+4;ypos1_old=buffer1(ptr1);new dataypos1_new=buffer1(ptr1+1)xpos1_new=ptr2+4;lineptr2,ypos_old+1,xpos_new,ypos_new+1,ILI9341_BLACK;erase last datalineptr2,ypos1_old+1,xpos1_new,ypos1_new+1,ILI9341_cyan;draw new data;ptr1=ptr1+1;data pointerptr2=ptr2+4;x position for start and end line x positionsloop;ploting done now redraw cursorline1,128,239,128,ILI9341_GREEN; Draw cursorline119,1,119,257,ILI9341_GREEN;after ploting;forptr1=1to60;get new samplesvolt=READAD10(an0)repeat2;scale 1024 bit sample to 255 pixels ie divide by 4setcoffrotatevoltrightEndRepeatbuffer2(ptr1)=buffer1(ptr1);new data to old databuffer1(ptr1)=255-volt;set 0,0 top left screen and update new datanextptr1;if 1000 1ms interrupts occurred print frequencyifnumber_of_1ms_interrupts=1000thenstoptimer1Frequency=Frequency*65536+timer1GLCDDrawString(0,280,str(Frequency)+" Hz ",ILI9341_white)clearTimer1number_of_1ms_interrupts=0frequency=0StartTimer1endifloop;subCounter1Overflownumber_of_timer1_overflows=number_of_timer1_overflows+1EndSub;subevery1msSettimer0, 6'1.002msstoptimer1temp_timer1=timer1;store timer 1 valuenumber_of_1ms_interrupts=number_of_1ms_interrupts+1Frequency=Frequency+number_of_timer1_overflows;total counter1 overflowsnumber_of_timer1_overflows=0;reset number_of_timer1_overflows for next 1msSettimer1, temp_timer1;restore timer 1 valueStartTimer1endsub;'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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 .
See the release candidate folder here: https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/
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
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.
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
This code once worked but now no frequency.
It's old but sure it worked before on mega328
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.
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.
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.