The fact that you do not get an error message is a bug. Originally this BYSTACK was not intended to be published. But when we did i forgot to review the code. I just did so and added an error. String and double are not supported. It is inefficient to pass them by stack, for a string the address could be passed but that is not the purpose of BYSTACK which was primarily added for the FT display code.
Enum is not supported and what i do is using constants with a gap : const Something10 = 10 const SOmething20=20 now i can simply insert 9 other values. I use this in all my coding. Enum was not in QB and only late introduced in VB so i never missed/used it. But i fully agree that it is a usable extension of the language. If someone like to fund it i can add it but i guess it is not that important.
From the wide range of available libraries, I chose "glcdSSD1306-I2C.lib". The second one, "glcdSSD1306-I2C-TWI.lib", works too. However, the third one, "glcdSSD1306-I2C_V2x2.lib", produces errors.
Error : 5 Line : -3327 No more space for BIT [I2C_ADDR] , in File : C:MCSBASCAVR2087LIBGLCDSSD1306-I2C_V2X2.LIB Error : 5 Line : -3327 No more space for BIT [I2C_ADDR] , in File : C:MCSBASCAVR2087LIBGLCDSSD1306-I2C_V2X2.LIB Error : 5 Line : -3327 No more space for BIT [_CONTRAST] , in File : C:MCSBASCAVR2087LIBGLCDSSD1306-I2C_V2X2.LIB Error : 5 Line : -3327 No more space for BIT [I2C_ADDR] , in File : C:MCSBASCAVR2087LIBGLCDSSD1306-I2C_V2X2.LIB Error : 5 Line : -3327 No more space for BIT [I2C_ADDR] , in File : C:MCSBASCAVR2087LIBGLCDSSD1306-I2C_V2X2.LIB Error : 5 Line : -3327 No more space for BIT [I2C_ADDR] , in File : C:MCSBASCAVR2087LIBGLCDSSD1306-I2C_V2X2.LIB Error : 5 Line : -3327 No more space for BIT [I2C_ADDR] , in File : C:MCSBASCAVR2087LIBGLCDSSD1306-I2C_V2X2.LIB
[quote:654270321f="Duval JP"]hi, maybe my post is stupid [quote:654270321f] but even the samples give error when try to compile them[/quote:654270321f]
I try to compile the sample adc.bas with axtiny816 and it is ok
Did you buy and install the add-on?[img:654270321f]https://www.mcselec.com/userpix/115_20260727_194148_1.jpg[/img:654270321f]
jp :wink:[/quote:654270321f]
Hi JP,
Of course i buyed&installed. In my pc it give errors (still win10) - but it is good idea to try on another pc.
[quote:28b5c8af7a="ok1hdu"]I don't have an Attiny816 here so I can't check it, so no guarantees, however: The correct syntax for setting Sysclock is:[code:1:28b5c8af7a] Config Sysclock = 16_20mhz , Prescale = 1[/code:1:28b5c8af7a] Then it should work:[code:1:28b5c8af7a] W = Getadc(5) : Print "W:" ; W[/code:1:28b5c8af7a]
Jarda[/quote:28b5c8af7a]
Thanks for your reply and sorry about my late response.
This config working today (with bascom 2.0.8.0.003) with another type ATtiny: [code:1:28b5c8af7a]'------------------------------------------------------------------------------- ' ATtiny402 ADC Dual-Channel Sampling Demo ' Function: Continuous sampling and channel switching between AIN6 and AIN7 '------------------------------------------------------------------------------- $regfile = "atxtiny402.dat" ' Microcontroller definition file $crystal = 20000000 ' System clock speed: 20 MHz
' Disable digital input buffers on analog pins as per datasheet recommendation Porta_pin6ctrl = Porta_pin6ctrl And &B11111000 ' Clear the lowest 3 ISC bits on PA6 Porta_pin6ctrl = Porta_pin6ctrl Or &B00000111 ' Set INPUT_DISABLE (7) on PA6 Porta_pin7ctrl = Porta_pin7ctrl And &B11111000 ' Clear the lowest 3 ISC bits on PA7 Porta_pin7ctrl = Porta_pin7ctrl Or &B00000111 ' Set INPUT_DISABLE (7) on PA7
'--- Variables --- Dim Adc_val_ch6 As Word ' Measured ADC value for AIN6 Dim Adc_val_ch7 As Word ' Measured ADC value for AIN7 Dim Current_channel As Byte ' Current active MUX channel ID
'--- ADC Initial Kick-off --- Adc0_muxpos = 6 ' Set initial analog channel to AIN6 Adc0_command = 1 ' Start first conversion in Free-Running mode
'--- Main Loop --- Do
' Read current MUX channel ID Current_channel = Adc0_muxpos And &B00011111 ' Mask out channel bits
' Channel switching logic with Free-Running correction If Current_channel = 6 Then Adc0_muxpos = 7 ' Switch target channel to AIN7 Bitwait Adc0_intflags.0 , Set ' Wait for previous conversion completion Adc0_intflags.0 = 1 ' Clear interrupt flag Adc_val_ch6 = Adc0_res ' Save converted result for AIN6 'Print Adc_val_ch6 ' Print value Bitwait Adc0_intflags.0 , Set ' Wait for fresh conversion on new channel Adc0_intflags.0 = 1 ' Clear interrupt flag Adc_val_ch6 = Adc0_res ' Read stabilized result for AIN6 Else Adc0_muxpos = 6 ' Switch target channel to AIN6 Bitwait Adc0_intflags.0 , Set ' Wait for previous conversion completion Adc0_intflags.0 = 1 ' Clear interrupt flag Adc_val_ch7 = Adc0_res ' Save converted result for AIN7 'Print Adc_val_ch7 ' Print value Bitwait Adc0_intflags.0 , Set ' Wait for fresh conversion on new channel Adc0_intflags.0 = 1 ' Clear interrupt flag Adc_val_ch7 = Adc0_res ' Read stabilized result for AIN7 End If
BASCOM-AVR : Enum : REPLY
Enum is not supported and what i do is using constants with a gap :
const Something10 = 10
const SOmething20=20
now i can simpl...
»
BASCOM-AVR : Enum : NEWTOPIC
I have a few places where an enumerated value would be helpful.
For example in a list of menus to be displayed I would, in C, u...
Funk-Fernbedienung 6 Kanal bidirektional hallo Leute, ich möchte Euch ein Projekt aus meiner Bascom Anfangszeit (2023) vorstellen.
eine 6 Kanal Funkfernsteuerung mit bidirektionaler Datenü...
»
CRC16 mag nicht Eine KI hat mir diesen Vorschlag erstellt um die Checksumme zu berechnen
BASCOM-Quellcode (76 Zeilen)Das läuft nicht, es kommen Fehlermeldungen
M...
»
Feuchtesensor Hallo,
ich hab solche 'Schätzeisen' im Einsatz, die zeigen im Boden sonst was. Während es auf dem Tisch sauber, wiederholbar unterscheiden konnte o...
»
Terminalplatine mobil Bislang hatte ich meine Terminalplatine ( Atmega 328 mit Display und Eingabetastatur) immer nur in Schaltschränken oder ortsfesten Gehäusen eingese...
»
OLED 1,5" 128x128 SH1107 habe mir aus China OLED-Display besorgt:
1,5 Zoll 128x128 Pixel , Treiber angeblich SH1107
leider gibt es dafür in Bascom-AVR keine Library.
meine ...
»
Hdmi Microskop Wie das im Leben so ist, mit jeden Geburtstag gehs mit den Augen weiter bergab.
Hat jemand eine HDMI Kamera bzw Microskop in Betrieb? Grad das HDMI...
Date published: Tue, 04 Aug 2026 11:57:14 +0000 Details
R.I.P Ben Zijlstra
Remembering Ben Zijlstra
We hope that people who love Ben will remember and celebrate his life.
more info at MCS
www.mcselec.com/index2.ph...
»
KaRadio webradio ESP8266
The Dimitris board is available at https://github.com/dsaltas/WiFi-WebRadio
This is a hardware project for Ka-Radio
»
93C46 small tool to edit 93C46 eeprom written in BascomAVR & VB
Bascom control the 93C46 so we sent data via comport from VB
code will be added later ...
»
nRF24L01+ RC Controller This is a RC controller TX & RX unit with nRF24L01+
nRF24L01+ / with PA and LNA for longer range
facts:
TX
1 x potmeter for servo
...
»
RAW lcd Connecting RAW lcd to atmega8
the lcd is 6 digit + time glass
LCD Hour Meter for tractor ,air compressor, ect
the lcd have 4 com pins & 14...