[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
I get mine from AliExpress in China. If you search for products using "ST7796S" or "ILI9488" on AliExpress, you will find many sellers. It also appears that 5.0-inch TFT LCDs using the SSD1963 controller are available on AliExpress.
O'family Great work, thank you. I used similar 5" screens (480 x 800 px) with SSD1963 controllers back in 2015â2017; unfortunately, those screens and the M2560 interface have disappeared from my supplier's catalog. Where do you get yours? Iâve switched to Nextion HMIs; Iâm happy with them, though I imagine the use case and price point are different.
Has anybody ported the open source Petite FAT File System to BASCOM? I need to read (no writing) from a microSD card using an ATtiny841. This chip is too small for AVR-DOS. But the Petite FAT should be possible on an ATtiny841. Before I try to use it with BASCOM, I wanted to find out if anybody has already gone down that road. Ideally I would like to first read the files in the root directory. Then read the selected file.
[b:7ba116c965][color=red:7ba116c965](BASCOM-AVR version : 2.0.8.7 )[/b:7ba116c965][/color:7ba116c965]
O-Family, huge thanks to you for all your work on this. It inspired me to make the required changes for bascom. I think users have no idea what a challenge it was/is to convert an older lib to the new word type but i have huge respect for your work. Thank you for sharing and that reminds me to hurry with the 2088. Please people : no questions about bascom 2088 here : just about the work of O-Family!
BASCOM-AVR : Petite FAT File System : REPLY
Try use KokkeKat library. I was use it even on Mega8 https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewforu...
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 ...
»
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...
»
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...
»
Start BASCOM Hallo zusammen
Seit einigen Wochen habe ich Startprobleme bei BASCOM. Nach Doppelklick bleibt BASCOM als Hintergrundprozess mit 0% CPU-Last hängen....
Date published: Fri, 31 Jul 2026 09:06:29 +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...