Activity for ToniG

  • ToniG ToniG posted a comment on discussion Open Discussion

    Haroen - I've decided to manually copy a backup file every time I think some part of code should be saved. That's just what I do as well, by appending a copy file code.gcb.bak1, code.gcb.bak2... in the working folder & at session end I copy changed files to external drive in chronological backup folders. Has saved my sanity on many occasions. Slightly relevant... When I compile a .gcb with SimulIDE it puts output files into a sub folder in the working folder.

  • ToniG ToniG posted a comment on discussion Open Discussion

    "Unfortunately installing GC Studio Code is the only way to update the compiler, that I know of," Chris, GCstudio is not for me either, I like to do things manually. After installing GCs a while back it modified many file associations that are used for other apps. For me I get just the updated folders (or files) from the install using eg. 7zip into a new app folder then copy (or edit) the Synwrite/lexer settings files from the previous install. I only update if I need to. (I am still on 2022-12-21...

  • ToniG ToniG posted a comment on discussion Open Discussion

    "Unfortunately installing GC Studio Code is the only way to update the compiler, that I know of," Chris, GCstudio is not for me either, I like to do things manually. After installing GCs a while back it modified many file associations that are used for other apps. For me I get just the updated folders (or files) from the install using eg. 7zip into a new app folder then copy (or edit) the Synwrite/lexer settings files from the previous install. I only update if I need to. (I am still on 2022-12-21...

  • ToniG ToniG posted a comment on discussion Open Discussion

    There is a good explanation of BAM here.... https://christian-marty.ch/ElectricThings/BitAngleModulation.html

  • ToniG ToniG posted a comment on discussion Open Discussion

    Good to see you got it working. The TM1651 lib code I attached to this post is identical to the TM1637, I just cut down the demo to simplify testing, & .h include text. The 'TM1651_HW_Driver.h' file can be deleted (It's unused)

  • ToniG ToniG posted a comment on discussion Open Discussion

    Looking at the sch for the board, dp is connected to seg 5. This shouldn't be causing your issues but set #Define TM_DispLen 3 Try slowing down your program with a wait 1000ms to see each digit being written en it should. Do all segments come on at power up ? & then clear. (if you are running the supplied test program.) Sending a 0 byte with tmSndDig should clear the digit. (this is what tmCLRdisp uses) Have you got a delay after the display clear(if you have an endless loop it could be writing again...

  • ToniG ToniG modified a comment on discussion Open Discussion

    I suspect there may be an error in the datasheet. It shows the display address in section 7.2 as 00H - 03H, then mentions address 0C4 & above are invalid. Looking at https://github.com/freekode/TM1651 it uses 0xC0 in TM1651.cpp If you get a nogo try changing back to TMaddr 0xC0 are you driving 7seg's or Bargraph ?

  • ToniG ToniG posted a comment on discussion Open Discussion

    I suspect there may be an error in the datasheet. It shows the display address in section 7.2 as 00H - 03H, & then then mentions address 0C4 & above are invalid. Looking at https://github.com/freekode/TM1651 it uses 0xC0 in TM1651.cpp If you get a nogo try changing back TMaddr 0xC0 are you driving 7seg's or Bargraph ?

  • ToniG ToniG posted a comment on discussion Open Discussion

    Hello Evan,. The interface data format looks identical to TM1637, & control registers as well (except only 4 digits). Referring the datasheet the display address starts at 00 (TM1637 start = C0 So as a first test, try the attached after setup for your hardware in "tm1651 Test1.gcb" & see how it goes... If digit pins are swapped(like some module boards) the ReMap will need activating & Table Digit_ReMap configured.

  • ToniG ToniG posted a comment on discussion General Discussion

    I am increasing audio volume of some mp4 videos, but the dB value is hidden under "Volume" text. This would likely be due to my laptop screen/font size settings. I managed to get the correct dB value entered by select & type value so I'm not stuck. There is some space beside the Audio section so maybe it could be widened ? cheers

  • ToniG ToniG posted a comment on discussion Help

    Converted a few .ino to GCB lately, Arduino coders - to set/clear a register bit, tend to like using shifting a bit into position using the register bit name as a constant eg.[mega328] ADCSRB = (0 << ACME) where ACME is bit 6 GCbasic... ADCSRB.6 = 0 So need to check the bitname position in mega328.dat file. "ACME,ADCSRB,6" As the chip-name is not defined in .ino code like GCbasic maybe some method of input the chip-name for convert .ino -> .gcb might be helpful.

  • ToniG ToniG posted a comment on discussion Open Discussion

    Haroen - I've decided to manually copy a backup file every time I think some part of code should be saved. That's just what I do as well, by appending a copy file code.gcb.bak1, code.gcb.bak2... in the working folder & at session end I copy changed files to external drive in chronological backup folders. Has saved my sanity on many occasions. Slightly relevant... When I compile a .gcb with SimulIDE it puts output files into a sub folder in the working folder.

  • ToniG ToniG posted a comment on discussion Help

    That works. Thanks I was misunderstanding that if I had a word variable (SpdRngPC) the calculation would be done as word. because this worked Temp1 = (Motor_Spd*(MaxPC-MinPC)) = 5520 I wrongly assumed the full calc was the same. I will be limiting the input values 0 - 100 % Liv&Lern

  • ToniG ToniG posted a comment on discussion Help

    Starting a new thread... The compiler seems to have trouble with the equation below for SpdRngPC when input is variables or from calculated constants. No_Var gives correct result = 64 SpdRngPC = (Motor_Spd*(MaxPC-MinPC)/100)+MinPC ' Scale & offset integer %calc No_Var = (80*(78-9)/100)+9 If I break it up then it calculates correct, Temp3 = 64. Temp1 = (Motor_Spd*(MaxPC-MinPC)) Temp3 = Temp1/100+MinPC Tried both PIC & AVR, on simulator & real hardware.

  • ToniG ToniG posted a comment on discussion Contributors

    (Sorry for late reply, I didn't get a mail notice for this thread) All looks good. 1 thing though, the "greatcowbasic.acp" in GCstudio\synwrite\data contains only TM1637, it was updated with TM1637/TM1638 as most commands are identical. File TM1637_1638 OEM ACP.txt 14.10.2022 07:25 is in file TM1638_OEM_Lib 14-10.zip sent you on 03.12.2022

  • ToniG ToniG posted a comment on discussion Open Discussion

    Thanks, I will check it.

  • ToniG ToniG posted a comment on discussion Open Discussion

    Latest install of GCstudio, my desktop shortcut to syn.exe calls up the IDE... this is all ok When I click on the hex button in Syn IDE, I get the asm output without basic statements, but it has the sub names. If I run the file "compile.bat mybas.gcb" in the GCstudio\GreatCowBASIC folder of GCstudio install the asm now contains the basic statements. This is how it used to be before GCstudio. So the compiler build does not appear broken.

  • ToniG ToniG posted a comment on discussion Open Discussion

    Where is the build_ folders In the zip folder attached to first post I just installed latest GCstudio 1208, no change to asm Files attached for comparative reference. I will try compile using cmd line manually to test... [I was chasing my tail a bit , I had a program that would not adjust the 3phase duty cycle from 16bit math % calculation, so I made a minimal test code, & as you found I didn't use word var in the Debug_Print sub. ] ^_^ So I will use 1174 for now for this math issue

  • ToniG ToniG posted a comment on discussion Open Discussion

    Sorry... the files in the build_ folders are output of 1183 compiler called from SimulIDE, arguments=" -NP -A:GCASM -R:text -O:$buildPath$fileName.asm $filePath" I will look at my synwrite install.

  • ToniG ToniG posted a comment on discussion Open Discussion

    Using Synwrite IDE, compiler build 1189, How do I re-enable /K:A option for asm. I am trying to troubleshoot a math calc issue with Mega328 ( likely my code) but the newer version does not show basic code in the asm (just the sub names). In build 1173 I can see every basic line in the asm which is great for analyzing issues. The compile.bat already has the /K:A option so this file may not be used by the IDE compile? I suspect the HW multiplier in the 328 might not be supported in the simulator I...

  • ToniG ToniG posted a comment on discussion Open Discussion

    ok thanks, good idea. I use a laptop for online. I thought I was going to be left behind due partly to my stubbornness to use less simple apps but after install & tweaking I still have the manual control I need (& like) Don't think I will ever go past win7 tho

  • ToniG ToniG modified a comment on discussion Open Discussion

    I have an offline design workstation Win7x64, 2012 dell990. Was holding off installing GCstudio, but I downloaded & installed today (GCB V1.00) . All good, no issues (I copied SynWrite settings ini files from an existing install so all my colors etc are restored). - I have a desktop shortcut straight to the new syn.exe For updates I will just download a new GCstudio & copy the files manually from the install file (7zip) It would be nice to have a couple of check boxes so I could choose to install...

  • ToniG ToniG posted a comment on discussion Open Discussion

    I have an offline design workstation Win7x64, 2012 dell990. Was holding off installing GCstudio, but I downloaded & installed today (GCB V1.00) . All good, no issues (I copied SynWrite settings ini files from an existing install so all my colors etc are restored). - I have a desktop shortcut straight to the new syn.exe For updates I will just download a new GCstudio & copy the files manually from the install file (7zip) It would be nice to have a couple of check boxes so I could choose to install...

  • ToniG ToniG modified a comment on discussion Contributors

    Apologies, I was supposed to updated this post a while ago... Attached zip with latest files for reference. (the latest GCB release will include these) This version can control multiple TM1638 displays.

  • ToniG ToniG posted a comment on discussion Contributors

    Apologies, I was supposed to updated this post a while ago... Attached zip with latest files for reference. (the latest GCB release will include these)

  • ToniG ToniG modified a comment on discussion Contributors

    Apologies, I was supposed to updated this post a while ago... Attached zip with latest files for reference. (the latest release will include these) This version can control multiple TM1638 displays.

  • ToniG ToniG posted a comment on discussion Contributors

    Apologies, I was supposed to updated this post a while ago... Attached zip with latest files for reference. (the latest release will include these)

  • ToniG ToniG posted a comment on discussion Open Discussion

    Thanks .

  • ToniG ToniG posted a comment on discussion Contributors

    Command Reference attached

  • ToniG ToniG posted a comment on discussion Open Discussion

    Is just the editor GC code available to download, I don't think GC studio is for me. My design PC workstation is strictly offline, & I'm not a big fan of auto updates, especially with a slow rural 4G . GCSTUDIO is pretty big at 607820k

  • ToniG ToniG modified a comment on discussion Contributors

    The new TM1638_OEM lib is now beta for review & comment. Please give it a try & see if anything doesn't work as expected. If anyone has the TM1638 board with the bicolor LED's, you can try setting LED 1 then LED 9, should be the 2 colors. I don't have a board to test. tmSetLED(1,On) : Wait 500 ms : tmSetLED(1,Off) : Wait 500 ms tmSetLED(9,On) : Wait 500 ms : tmSetLED(9,Off) : Wait 500 ms Commands are the same as TM1637_OEM lib. with some minor difference & addition. Due to the various hobby boards...

  • ToniG ToniG modified a comment on discussion Open Discussion

    The standalone IDE using Synwrite is pretty good, has a great search/replace & lexer is very functional. But there are a few issues (mainly with the comment text & line chr space proportion that cannot be addressed. The more opensource successor CudaText should be a viable choice. It could be provided in parallel to Synwrite for a while just in case there is some unforeseen issues. I don't know how different all the GCBasic specific configuration, lexer, etc...would be between the 2 but being the...

  • ToniG ToniG posted a comment on discussion Open Discussion

    The standalone IDE using Synwrite is pretty good, has a great search/replace & lexer is very functional. But there are a few issues (mainly with the comment text & line chr space proportion that cannot be addressed. The more opensource successor CudaText should be a viable choice. It could be provided in parallel to Synwrite for a while just in case there is some unforeseen issues. I don't know how different all the GCBasic specific configuration, lexer, etc...would be between the 2 but being the...

  • ToniG ToniG posted a comment on discussion Contributors

    The new TM1638_OEM lib is now beta for review & comment. Please give it a try & see if anything doesn't work as expected. If anyone has the TM1638 board with the bicolor LED's, you can try setting LED 1 then LED 9, should be the 2 colors. I don't have a board to test. tmSetLED(1,On) : Wait 500 ms : tmSetLED(1,Off) : Wait 500 ms tmSetLED(9,On) : Wait 500 ms : tmSetLED(9,Off) : Wait 500 ms Commands are the same as TM1637_OEM lib. with some minor difference & addition. Due to the various hobby boards...

  • ToniG ToniG modified a comment on discussion Help

    I have updated the test code to enable Multiple key press, a value greater than 24 will be result. Only the boards with diodes on the key lines will work (so not the QYF- board) Not all combination will work due to the LED multiplexing.?? The actual return value of a multi key press is (obviously) dependent on the wiring order between switches & TM1638 so could vary between different boards. The "LED&KEY" board has misaligned key wiring ( K3 & KS not sequential). An OEM board should align switch...

  • ToniG ToniG modified a comment on discussion Help

    Please disregard the previous "Test_TM1638_Buttons.gcb", there are 2 issues with 2 buttons code. I only have 1 board that will do multi button press test. LED&KEY (17-24 key codes) 1. The method was flawed, same value could result with different combination of low key values. 2. My assumption "...due to the LED multiplexing.??" was incorrect, actually was due to 2 key bits in the same byte. I have modified to new file "Test_TM1638_2Buttons.gcb" It has 2 bytes. ButnVal for 1 key & ButnVal2 for 2nd...

  • ToniG ToniG posted a comment on discussion Help

    I click the make hex button in the IDE, G+Stool calls batch file(s) I have tried various permutations... conditionaldebugfile = "sourcefilename".gcb "sourcefileame".gcb conditionaldebugfile = Test_TM1638_2Buttons.gcb, make hex with other source file & don't change name in .ini etc It always produces the .CDF in the source folder & with current compiled file name so that is ok

  • ToniG ToniG posted a comment on discussion Help

    No, you don't need to. I just updated the test file as I was finding things that were not right. I was interested in anyone with some different boards to test, but as the new lib has a flexible setup (& easy default) they hopefully will ask for help on the forum if their board does not work.. Thanks for your testing & advise. The new TM1638_OEM lib is ready now for review. On the subject of the CDF output, I get a different structure from what you posted. There is mostly symbols not used in my program...

  • ToniG ToniG modified a comment on discussion Help

    Please disregard the previous "Test_TM1638_Buttons.gcb", there are 2 issues with 2 buttons code. I only have 1 board that will do multi button press test. LED&KEY (17-24 key codes) 1. The method was flawed, same value could result with different combination of low key values. 2. My assumption "...due to the LED multiplexing.??" was incorrect, actually was due to 2 key bits in the same byte. I have modified to new file "Test_TM1638_2Buttons.gcb" It has 2 bytes. ButnVal for 1 key & ButnVal2 for 2nd...

  • ToniG ToniG modified a comment on discussion Help

    Please disregard the previous "Test_TM1638_Buttons.gcb", there are 2 issues with 2 buttons code. I only have 1 board that will do multi button press test. LED&KEY (17-24 key codes) 1. The method was flawed, same value could result with different combination of low key values. 2. My assumption "...due to the LED multiplexing.??" was incorrect, actually was due to 2 key bits in the same byte. I have modified to new file "Test_TM1638_2Buttons.gcb" It has 2 bytes. ButnVal for 1 key & ButnVal2 for 2nd...

  • ToniG ToniG modified a comment on discussion Help

    Please disregard the previous "Test_TM1638_Buttons.gcb", there are 2 issues with 2 buttons code. I only have 1 board that will do multi button press test. LED&KEY (17-24 key codes) 1. The method was flawed, same value could result with different combination of low key values. 2. My assumption "...due to the LED multiplexing.??" was incorrect, actually was due to 2 key bits in the same byte. I have modified to new file "Test_TM1638_2Buttons.gcb" It has 2 bytes. ButnVal for 1 key & ButnVal2 for 2nd...

  • ToniG ToniG posted a comment on discussion Help

    Display...

  • ToniG ToniG modified a comment on discussion Help

    Please disregard the previous "Test_TM1638_Buttons.gcb", there are 2 issues with 2 buttons code. I only have 1 board that will do multi button press test. LED&KEY (17-24 key codes) 1. The method was flawed, same value could result with different combination of low key values. 2. My assumption "...due to the LED multiplexing.??" was incorrect, actually was due to 2 key bits in the same byte. I have modified to new file "Test_TM1638_2Buttons.gcb" It has 2 bytes. ButnVal for 1 key & ButnVal2 for 2nd...

  • ToniG ToniG posted a comment on discussion Help

    Please disregard the previous "Test_TM1638_Buttons.gcb", there are 2 issues with 2 buttons code. I only have 1 board that will do multi button press test. LED&KEY (17-24 key codes) 1. The method was flawed, same value could result with different combination of low key values. 2. My assumption "...due to the LED multiplexing.??" was incorrect, actually was due to 2 key bits in the same byte. I have modified to new file "Test_TM1638_2Buttons.gcb" It has 2 bytes. ButnVal for 1 key & ButnVal2 for 2nd...

  • ToniG ToniG posted a comment on discussion Help

    I have updated the test code to enable Multiple key press, a value greater than 24 will be result. Only the boards with diodes on the key lines will work (so not the QYF- board) Not all combination will work due to the LED multiplexing.?? The actual return value of a multi key press is (obviously) dependent on the wiring order between switches & TM1638 so could vary between different boards. The "LED&KEY" board has misaligned key wiring ( K3 & KS not sequential). An OEM board should align switch...

  • ToniG ToniG modified a comment on discussion Help

    I use the following now to set default constants... ' Default Constants ( Set if not #Define in Main) #Script IF NODEF(TM_DispLen) Then TM_DispLen=8 ' 7seg display No. of digits END IF IF NODEF(TM_LEDs) Then TM_LEDs=0 ' LEDs other than 7Seg display (use high buffer bytes) END IF IF NODEF(Com_Cathode) And NODEF(Com_Anode) Then ' Set const "Com_Cathode" Com_Cathode="" END IF IF NODEF(TMDly) Then TMdly=10 ' clk <-> DIO delay us END IF IF NODEF(KeyMap) Then KeyMap=ButnMap1 ' Sensible button map END IF...

  • ToniG ToniG posted a comment on discussion Help

    I use the following now to set default constants... ' Default Constants ( Set if not #Define in Main) #Script IF NODEF(TM_DispLen) Then TM_DispLen=8 ' 7seg display No. of digits END IF IF NODEF(TM_LEDs) Then TM_LEDs=0 ' LEDs other than 7Seg display (use high buffer bytes) END IF IF NODEF(Com_Cathode) And NODEF(Com_Anode) Then ' Set const "Com_Cathode" Com_Cathode="" END IF IF NODEF(TMDly) Then TMdly=10 ' clk <-> DIO delay us END IF IF NODEF(KeyMap) Then KeyMap=ButnMap1 ' Sensible button map END IF...

  • ToniG ToniG posted a comment on discussion Help

    thanks (memory leak again :-)

  • ToniG ToniG posted a comment on discussion Help

    TM1638 Button code is here, you can try it when you get your new TM1638 board. The full TM1638_OEM library should be ready soon...

  • ToniG ToniG posted a comment on discussion Help

    Hello to all GCbasic users out there. I need a bit of help to test the buttons (& specific displays) Attached is a .GCB test program to read TM1638 Keys & display Button Number or Raw hex data. (4 bytes) I have tested 2 module boards I have: "LED&KEY" - This one is Common Cathode display with non sequential wired button switches "QYF-TM1638" -This one is Common Anode display with sequentially wired button switches & digit com pins are wired reverse. If you get a garbled display or out of order buttons,...

  • ToniG ToniG posted a comment on discussion Help

    Build 1165 I don't see a CDF file in my working folder or where the Errors.txt file is . & I will look at the NO DEF to check for existing constant Thanks

  • ToniG ToniG posted a comment on discussion Help

    Works perfectly, Thanks. I see now Com_Anode = "" creates a constant with null value. ' Specific board types (select 1) '------------------------------------------------------------- // #Define LED_KEY 'for "LED&KEY" module board (Common Cathode display & Btn re-Map) #Define QYF_TM1638 'for "QYF-TM1638" board (Common Anode display & rev. digits) // #Define NEW_BRD '< Add new board here & edit #Script '------------------------------------------------------------ #Script IF DEF(QYF_TM1638) Then Com_Anode...

  • ToniG ToniG posted a comment on discussion Help

    Thanks heaps, I will digest, rewrite & test

  • ToniG ToniG posted a comment on discussion Help

    "Maybe this is what you want" Not really... I am not assigning any values to the constants, just the constant name. I want to create new constant(s) inside only 1 IF DEF() .... End If block based on 1 defined constant. (so only 1 IF DEF will be true) By... commenting unwanted #Define: #Define Const1 '< 1 previous defined constant. // #Const2 // #Const3 Then test which constant name exist "IF DEF(Const1)" & create specific constant(s) in the test: #Script IF DEF(Const1) Then #DEFINE Com_Anode ' CA...

  • ToniG ToniG posted a comment on discussion Help

    TM1638 Button Test code is nearly ready, will post a link. Its great when we find hackable products to improve or repurpose. So many have such cheap/customized parts making it not viable. Our local Tip-Shop won't sell anything electronic now, saying its e-waste, I argue it's not if someone can use it.

  • ToniG ToniG posted a comment on discussion Help

    I am having some trouble with #defines in a script. The IF DEF() are ok as expected, using a warning "message" to see working. But getting unexpected behavior, #Define Butn_Map1 is active (but should be excluded) . Example code snippet below, When compile program I get the wrong hex file checksum. In .asm can see the Table ButnMap1 The correct Warning "message" is shown from script but #Define Butn_Map1 is active. If I comment the second IF DEF() block it compiles with correct checksum & run ok....

  • ToniG ToniG posted a comment on discussion Help

    Are you reading buttons from 18F pins or TM key inputs? I have got some code working for TM1638 buttons & it should work for TM1628.

  • ToniG ToniG modified a comment on discussion Help

    Hello Jeff, probably a bit late now you have the display lit up. I am almost finished a new TM1638_OEM_Lib cloned from TM1637_OEM_Lib. (still in alpha/beta) Its all working except for some of the subs with ComAnode display. The Fixed address mode of the TM1628 looks the same as TM1638. Anyway, I have attached a test program (its a simple clock), i just pulled a few subs from the TM1638 lib, it was quite easy as it has a very modular structure. cheers Toni.G Buffer send sub... Sub tmSndBuf (Optional...

  • ToniG ToniG posted a comment on discussion Help

    Hello Jeff, probably a bit late now you have the display lit up. I am almost finished a new TM1638_OEM_Lib cloned from TM1637_OEM_Lib. (still in alpha/beta) Its all working except for some of the subs with ComAnode display. The Fixed address mode of the TM1628 looks the same as TM1638. Anyway, I have attached a test program (its a simple clock), i just pulled a few subs from the TM1638 lib, it was quite easy as it has a very modular structure. cheers Toni.G Buffer send sub... Sub tmSndBuf (Optional...

  • ToniG ToniG posted a comment on discussion Help

    I'm on the train to everywhere with an undefined timetable. bit like a subatomic particle

  • ToniG ToniG posted a comment on discussion Contributors

    Don't think its ready for commit to release yet, #includes are still local, option explicit still active, ... @ToniG "This version is alpha & for Test/Comment/Review" #Include "TM1638_OEM_Cmd_Lib.h" #Include "TM1638_OEM_Message.h" #Include "TM1637_HW_Driver.h" # OPTION explicit '< while in dev...

  • ToniG ToniG posted a comment on discussion Help

    113d that I send is an F so that's working ok. I just misread a table, 2 is 91d

  • ToniG ToniG modified a comment on discussion Help

    Thanks Evan, much appreciated. The boards I ordered look like that one. I can investigate why the 2 is an F, should be easy enough to find Now I know I am on the right train. cheers

  • ToniG ToniG posted a comment on discussion Help

    Thanks Evan, much appreciated. The boards I ordered look like that one. I can investigate why the 2 is an F, both have 4 segments on so should be easy enough to find Now I know I am on the right train. cheers

  • ToniG ToniG modified a comment on discussion Help

    I suspect the TM1638 board I have "QYF-TM1638" one with no discrete LED's is not right, Setting registers sequentially it displays digits from right to left, 1 digit data goes to all digits same segment. https://youtu.be/FOhTs2_JT_A If someone has a different 8 digit TM1638 board & can test it would be most helpful. It will be some weeks before I get new different boards. The attached .gcb is setting registers of the TM1638 0 to 16 The display should show : "2" at digit 2 for 1 s, then all segments...

  • ToniG ToniG posted a comment on discussion Contributors

    Yes, attached. File compare should show just 1 line change.

  • ToniG ToniG posted a comment on discussion Contributors

    Ok, Back to the TM1637 lib submitted for review. There is a line of code missing in Sub tmSndBuf. - " TM_lp2 = TMlp2 '< If not remap" I noticed it when I set Var TM_6dReMap = Off (off = correctly wired displays = not 6digit hobby modules)

  • ToniG ToniG posted a comment on discussion Help

    I suspect the TM1638 board I have "QYF-TM1638" one with no discrete LED's is not right, setting registers it displays digits from right to left & 1 digit data goes to all digits. https://youtu.be/FOhTs2_JT_A If someone has a different 8 digit TM1638 board & can test it would be most helpful. It will be some weeks before I get new different boards. The attached .gcb is setting registers of the TM1637 0 to 16 The display should show : 2 at digit 2 for 1 s, then all segments on for each digit left to...

  • ToniG ToniG posted a comment on discussion Contributors

    Yes, I tried the new TM1637 lib - no action on a TM1638 board That is because the new TM1637 lib is for TM1637 & not a TM1638 board. TM1637 lib is for TM1637 boards only. TM1637 - 2 wire I2C like interface CLK DIO TM1638 - 3 wire SPI like interface STB CLK DIO

  • ToniG ToniG posted a comment on discussion Contributors

    No, this is a different device TM1638 lib, submitted the TM1637 lib for review , I just updated as you mentioned... I just tried the TM1638 code. Too many issues to resolve. I will look another time I assumed you tried to re-code my lib for TM1638 (I should have asked for clarification) I will start a new discussion topic "TM1638_OEM_ Lib" when I get new info.

  • ToniG ToniG modified a comment on discussion Contributors

    TM1638. I ported? the TM1637_OEM_lib to TM1638, was simpler than I assumed 1. Change all Start/Stop to Strobe line Low/Hi. 2. Delete ACK code. 3. Digit address set to even registers. (digit-1)*2 4. a few tweaks & limitations. That was the easy part, but I could not get it working properly, data message looked good but display was garbled, on/off & bright were working ok. I made a test program to fill successive 16 registers with bytes & bits with 400ms waits to observe, it looks like the TM1638 board...

  • ToniG ToniG posted a comment on discussion Contributors

    TM1638. I ported? the TM1637_OEM_lib to TM1638, was simpler than I assumed 1. Change all Start/Stop to Strobe line Low/Hi. 2. Delete ACK code. 3. Digit address set to even registers. (digit-1)*2 4. a few tweaks & limitations. That was the easy part, but I could not get it working properly, data message looked good but display was garbled, on/off & bright were working ok. I made a test program to fill successive 16 registers with bytes & bits with 400ms waits to observe, it looks like the TM1638 board...

  • ToniG ToniG posted a comment on discussion Contributors

    I started with the TM1638, I wanted to see scrolling text on 10 LED digits, & display 40bit hex, but had a 5m flood & another La Nina summer coming... I'm still getting the water out of the tractor hydraulics.

  • ToniG ToniG modified a comment on discussion Contributors

    Help reference attached.

  • ToniG ToniG posted a comment on discussion Contributors

    Help reference attached.

  • ToniG ToniG posted a comment on discussion Contributors

    Its nice that the re-define shows in the report? Defined in include as default, & defined in program as (potentially) new value. CODE/CurrentValues: TM_DISPLEN 6 1 4 Constant: TM_DISPLEN now '6' tobe '6' ;?F2L84S0I84? I wonder if sub call depth could be reported in debug (just wishing)

  • ToniG ToniG posted a comment on discussion Contributors

    It is final from me at this point, review this version. I am interested if someone can try it & feedback if somethings not working right or "a better way to do this". I had a bit of luck with the ACK code. I wondered how I was going to test for NACK when later I started to get display anomalies after changing chips & compiler version, thinking that was my issue, then I looked with the scope & saw the problem, I left the logic analyzer connected but it wasn't powered! (PIC has more drive pin current...

  • ToniG ToniG posted a comment on discussion Contributors

    TM1637 is great for where there is a need for buttons & LED display & fewer pins on the micro. I needed to read buttons & display more than 1 value, display long strings, flash some digits etc. It was not feasible to build upon the existing lib(s) as I needed a more modular code structure. The library is targeted to OEM display boards(ones we make), OTS 4d & 6d hobby modules are supported. There are 3 sections to the library, 1. Command lib, 2. Message processor, 3. Hardware driver. Initially it...

  • ToniG ToniG posted a comment on discussion Compiler Problems

    Another workaround is similar to the bit set for an array. Dim TmpBit as Bit TmpBit = Temp_1.Seg_n : TmpBit = !TmpBit : Temp_1.Seg_n = TmpBit '< Workaround 2

  • ToniG ToniG posted a comment on discussion Open Discussion

    So all is good now ? Yes, this is resolved - thanks all. Just the wee issue with toggling a Var bit with Not https://sourceforge.net/p/gcbasic/discussion/596084/thread/9a9ce1752a/

  • ToniG ToniG modified a comment on discussion Compiler Problems

    I use bit set with a byte variable for the bit number without issue Tmp_1 = DBuf(DigN) Tmp_1.Seg_n = SEGon ' ok But when I use a var with NOT to toggle the bit I get an error. Temp_1.Seg_n = !Temp_1.Seg_n '< Error: SysTemp1 is not a bit or valid constant I used a workaround to keep going (If statement) , Issue test code below... 'Toggle bit Test #chip 12F683, 8 #config Osc = Int Seg_n = 7 Temp_1 = 255 'Toggle disp buffer array bit Temp_1.7 = !Temp_1.7 'OK Temp_1.Seg_n = !Temp_1.Seg_n '< Error: SysTemp1...

  • ToniG ToniG modified a comment on discussion Compiler Problems

    I use bit set with a byte variable for the bit number without issue Tmp_1 = DBuf(DigN) Tmp_1.Seg_n = SEGon ' ok But when I use a var with NOT to toggle the bit I get an error. Temp_1.Seg_n = !Temp_1.Seg_n '< Error: SysTemp1 is not a bit or valid constant I used a workaround to keep going (If statement) , Issue test code below... 'Toggle bit Test #chip 12F683, 8 #config Osc = Int Seg_n = 7 Temp_1 = 255 'Toggle disp buffer array bit Temp_1.7 = !Temp_1.7 'OK Temp_1.Seg_n = !Temp_1.Seg_n '< Error: SysTemp1...

  • ToniG ToniG posted a comment on discussion Open Discussion

    @ToniG The test code here still doesn't work Sorry, my bad. somehow a typo got inserted in my testing & main was calling with SEG_on. The following is the original sub I was having trouble with, declaring SEG_on as bit got it working. The other issue was I was calling another sub (now deleted) & I had the params reversed. In this sub I set TMtmp_1.Seg_n = SEG_on [I really need to get more sleep...] tmSegBuf(DIGn, SEGn, BitState) Sub tmSegBuf(In Dig_n, In Seg_n, In SEG_on as bit, Optional In Dbuf()...

  • ToniG ToniG posted a comment on discussion Open Discussion

    I am not using registers, the pins being set here are just for testing with simulator. I have a main program with a "command" that calls the Sub(include file) with Parameters, the 3rd Param is the state of the bit 0 or 1. The bit being set is in an array. & I had another issue that was masking somewhat the main problem... Anyway I have it working,, in main code I didn't have In SEG_on as Bit & the sub was reading a byte? The test code here still doesn't work but I will put that aside. (too tired...

  • ToniG ToniG modified a comment on discussion Open Discussion

    How do I pass a bit var to a subroutine ? I thought I had it working but I had a typo & was just referencing the source variable from the main. (reproduced in following code) Capturing port pins on logic analyzer... #chip 12F683, 8 #config Osc = Int #Define DIO1 GPIO.0 #Define DIO2 GPIO.1 Dir DIO1 Out Dir DIO2 Out Dim SEGon as Bit DIGn = 2 SEGn = 3 SEGon = Off wait 500 us Main: Test1(DIGn, SEGn, SEGon) DIO1 = SEGon DIO2 = Tmp_1.SEGn SEGon = !SEGon 'Toggle wait 50 us Goto Main End Sub Test1(In Dig_n,...

  • ToniG ToniG posted a comment on discussion Open Discussion

    How do I pass a bit var to a subroutine ? I thought I had it working but I had a typo & was just referencing the source variable from the main. (reproduced in following code) Capturing port pins on logic analyzer... #chip 12F683, 8 #config Osc = Int #Define DIO1 GPIO.0 #Define DIO2 GPIO.1 Dir DIO1 Out Dir DIO2 Out Dim SEGon as Bit DIGn = 2 SEGn = 3 SEGon = Off wait 500 us Main: Test1(DIGn, SEGn, SEGon) DIO1 = SEGon DIO2 = Tmp_1.SEGn SEGon = !SEGon 'Toggle wait 50 us Goto Main End Sub Test1(In Dig_n,...

  • ToniG ToniG posted a comment on discussion Compiler Problems

    I use bit set with a byte variable for the bit number without issue Tmp_1 = DBuf(DigN) Tmp_1.Seg_n = SEGon ' ok But when I use a var with NOT to toggle the bit I get an error. Temp_1.Seg_n = !Temp_1.Seg_n '< Error: SysTemp1 is not a bit or valid constant I used a workaround to keep going (If statement) , Issue test code below... 'Toggle bit Test #chip 12F683, 8 #config Osc = Int Seg_n = 7 Temp_1 = 255 'Toggle disp buffer array bit Temp_1.7 = !Temp_1.7 'OK Temp_1.Seg_n = !Temp_1.Seg_n '< Error: SysTemp1...

  • ToniG ToniG modified a comment on discussion Compiler Problems

    Is probably a win7 anomaly. I was running previously SimulIDE & it crashes a bit. Thanks for checking I also remember crashing the compiler when I forgot to add the # to the Endif, This may have upset something temporarily.

  • ToniG ToniG posted a comment on discussion Open Discussion

    I like the use of caps for making a File/Variable name more 'readable'. I would SecondTheSecondOption.

  • ToniG ToniG posted a comment on discussion Compiler Problems

    Is probably a win7 anomaly. I was running previously SimulIDE & it crashes a bit. Thanks for checking

  • ToniG ToniG posted a comment on discussion Compiler Problems

    Attached test code showing compile time. However, it is odd indeed! in reverting (undo, undo...) the code that took 9.7s now is 1.4s. Did a file compare to be sure. The other program I am working on also compiles fast again now (no code changes). I am using the hex button in Synwrite IDE. If I notice this again I will restart the IDE & see.

  • ToniG ToniG posted a comment on discussion Compiler Problems

    Is it normal to take much longer to compile with 1 each #IFdef & #Ifndef is a program ? 1.79s without & 7.91s with. Just curious.

  • ToniG ToniG posted a comment on discussion Compiler Problems

    Probably just the cold mornings & not enough antifreeze... Putting the #Ifdef, #Ifndef code sections inside the 1 sub works ok

  • ToniG ToniG posted a comment on discussion Compiler Problems

    I'm using #Define & #Ifdef, Ifndef to select 1 of 2 subroutines to select 2 different serial addressing modes. The Sub's need to be the same name as they are commands in a library (include file). It looks like 'Overloaded Subroutines' is preceding the #Ifdef, Ifndef. I made some quick test code attached... First 2 subs (Sub Test1) with issue, works perfect with Subs 3 & 4 Sub Test2 & Sub Test3 #chip 12F683,8 #config Osc = Int Dim X2 as String *10 #Define TestMode1 Main: Test1 Test2 Test3 Goto Main...

  • ToniG ToniG posted a comment on discussion Open Discussion

    Thanks . Looking in Help under ... Subroutines, Using subroutines: ... Arrays: I don't see any mention of empty brackets () as reference to an Array. Search engine doesn't like () but searching the PDF help shows examples. cheers Sub Get_Chr( in Str1() ) ----- or ---- Get_Chr "12345" Sub Get_Chr( in Str1() ) StrChr = Str1(3) ' StrChr = 51 End Sub

  • ToniG ToniG posted a comment on discussion Open Discussion

    " if you treat the string like an array it will be a lot faster" I thought I was here... SubStr(0) SubStr(StrPos) Do you mean reference the string as an array ? I can only get (SubStr as string) to work (SubStr as Array) Does not compile.

  • ToniG ToniG posted a comment on discussion Open Discussion

    I was thinking a false assumption... Passing a string to a Sub already behaves as I want, just needed to get the structure right. RAM is only allocated for the source string (not duplicated by the sub as I first thought) Here's the quick test code #OPTION explicit #chip 12F683,8 #config Osc = Int Dim StringVar as String * 36 StringVar = "0123456789abcdefghijklmnopqrstuvwxyz" Main: ExtractASCII_2(StringVar) '; ExtractASCII_2("0123456789abcdefghijklmnopqrstuvwxyz") ' <-same Mem. table Goto Main Return...

  • ToniG ToniG posted a comment on discussion Open Discussion

    I have a sub that is part of an include file & I want to process a string from the main code, so the sub won't know in advance the string variable name, unless it can be passed or set somehow from main. The string might be very long so not really practical to pass the variable itself. It would be possible to specify the String name the main code has to use but would be preferable to let the programmer choose. or pass a string of the VarName but I don't think think this can be applied to a variable...

  • ToniG ToniG modified a comment on discussion Open Discussion

    I had a need for additional functionality with TM1637 library (read key/buttons, 2 values on 1 display, remap digits etc... ) so I made a new include based on existing. During testing some problems, I noticed an anomaly on the DIO where TM & Micro were fighting for about half CLK . It occurs at the start of ACK & only when the last data bit is a 1 (as is with C0 address command). This does not stop communication but better to fix it. I am testing with 12F683 device. TM asserts the pin(ACK) when the...

  • ToniG ToniG posted a comment on discussion Open Discussion

    I had a need for additional functionality with TM1637 library (read key/buttons, 2 values on 1 display, remap digits etc... ) so I made a new include based on existing. During testing some problems, I noticed an anomaly on the DIO where TM & Micro were fighting for about half CLK . It occurs at the start of ACK & only when the last data bit is a 1 (as is with C0 address command). This does not stop communication but better to fix it. I am testing with 12F683 device. If someone can test this on some...

1 >