Main Menu
Counter
This page today ...
total: 0
unique: 0

This page ever ...
total: 219
unique: 150

Site ...
total: 4175
unique: 2371
Online
  • Guests: 3
  • Members: 0
  • Newest Member: ole
  • Most ever online: 170
    Guests: 170, Members: 0 on Sunday 15 January 2023 - 07:39:26
Chatbox
You must be logged in to post comments on this site - please either log in from the Login box or from here.If you are not registered click here to signup.


bullet Kim
5 years ago
test
Royalsystems blog

MCS Electronics Forum

  • Share your working BASCOM-AVR code here : Bar Graphs/progress bars : REPLY



    I am working on having a box around the bar like we see on battery meters
    as soon as its working correctly so the size of the graph can be set then
    just the number of steps is then told to be placed in the box I will post it

    Regards Paul

  • Share your working BASCOM-AVR code here : Bar Graphs/progress bars : REPLY



    hi Paul

    thank you for sharing cheesey
    A clever way to make bars with little resources since the bgf files are very small.

    would love to see a screen dump too.

  • BASCOM-AVR : Fold function is not working. Unfold - OK. : REPLY



    you should post an example code along with a screen of the editor.
    for me it always works.

  • BASCOM-AVR : Fold function is not working. Unfold - OK. : NEWTOPIC



    Hello,

    I'm writing to you to ask, if you also have a problem with fold/unfold function.
    I'm able to unfold code but not able to fold it (sub/functions and #if fold, #endif).


    Win 10, 22H2.
    Thanks,
    Przemek

    [b:35ec9e4197][color=red:35ec9e4197](BASCOM-AVR version : 2.0.8.6 )[/b:35ec9e4197][/color:35ec9e4197]

  • BASCOM-AVR : Ariadne TCP/IP bootloader : NEWTOPIC



    Hi,
    I needed a bootloader for my project that would work over TCP/IP. I found the Ariadne Bootloader, designed for Arduino projects. When I tried to upload a *.bin file created by Bascom, the file was rejected due to some "validation." I disabled this protection in the source files and recompiled it. If it helps someone, the finished files for Atmega1284, Atmega328, and Atmega2560 are included in the zip file.

    I also attached a write_ariadne_eeprom.bas file for writing TCP/IP configuration to EEPROM.
    I hope it will be useful.


    I'm also curious about what the "validation" of the *.bin file is. And why the Bascom bin file is different from the Arduino *.bin file. smile

    Vojta

    [b:26174d8dbf][color=red:26174d8dbf](BASCOM-AVR version : 2.0.8.6 )[/b:26174d8dbf][/color:26174d8dbf]

  • Share your working BASCOM-AVR code here : Bar Graphs/progress bars : NEWTOPIC



    I wanted to draw bar graphs and a battery level indicator on 128 x 64 and 240 x 64
    displays but wanted a simple versatile code conservative way to do it I made some
    bit map files converted them to bgf format for bascom and now can make a number
    of bar type objects on the displays simply by stacking the the bit maps the demo code for
    a 240 x 64 display is below the bgf bit maps in the zip
    Regards Paul

    [code:1:a1461de1dc]
    $regfile = "m1284pdef.dat" 'Set the AVR to use.
    $crystal = 20000000 'Set the AVR clock.
    '
    $hwstack = 40 'Set the capacity of the hardware stack.
    $swstack = 40 'Set the capacity of the software stack.
    $framesize = 40 'Set the capacity of the frame area.
    $baud = 115200



    'First we define that we use a graphic LCD
    'Config Graphlcd = 128x64sed , Dataport = Porta , Controlport = Portc , Ce = 2 , Ce2 = 3 , Cd = 7 , Rd = 6 , Reset = 4 , Enable = 5
    Config Graphlcd = 240x64 , Dataport = Porta , Controlport = Portc , Ce = 5 , Cd = 6 , Wr = 3 , Rd = 4 , Reset = 7 , Fs = 2 , Mode = 6

    'The dataport is the portname that is connected to the data lines of the LCD
    'The controlport is the portname which pins are used to control the lcd
    'CE =CS1 Chip select
    'CE2=CS2 Chip select second chip
    'CD=Data/instruction
    'RD=Read
    'RESET = reset
    'ENABLE= Chip Enable







    Dim Bars As Word


    Config Portd.6 = Output 'flashing led




    Cls 'Erase the full screen of the graphic LCD.








    Do

    'flash led
    Reset Pind.6
    Wait 1
    Set Pind.6
    Cursor Off


    Cls

    For Bars = 0 To 60 Step 6
    Locate 1 , 1 : Lcd Bars
    Showpic Bars , 48 , Hsbar
    Wait 1
    Next


    For Bars = 64 To 0 Step -8
    Locate 1 , 1 : Lcd Bars
    Showpic 90 , Bars , Vsbar
    Wait 1
    Next


    Cls

    For Bars = 64 To 0 Step -8
    Locate 1 , 1 : Lcd Bars
    Showpic 90 , Bars , Vs8bar
    Wait 1
    Next

    For Bars = 0 To 60 Step 6
    Locate 1 , 1 : Lcd Bars
    Showpic Bars , 48 , Hs8bar
    Wait 1
    Next




    Loop
    '
    End 'The end of the program.





    'horizontal bar
    Hsbar:
    $bgf "HSbar.bgf"
    'vertical bar
    Vsbar:
    $bgf "vSbar.bgf"

    'small vertical bar 8 pixle
    Vs8bar:
    $bgf "VS8bar.bgf"

    'small horizontal bar 8 pixle
    Hs8bar:
    $bgf "HS8bar.bgf"
    [/code:1:a1461de1dc]

  • BASCOM-AVR XTINY/MEGAX/AVRX : AVR EA : REPLY



    [quote:56eb1ae269="programmista123"]Hello All!

    I've just looked into Microchip www and I can see that, they release new family: EA. [url=https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/8-bit-mcus/avr-mcus/avr-ea] Link
    It looks like it has much better ADC (sampling rate, accumulation).

    It's just for info - for me, DB series is still the best one cheesey

    Regards,
    Przemek[/quote:56eb1ae269]
    For me this is new: set a Chopping bit in ADC to reduce offset.

  • BASCOM-AVR XTINY/MEGAX/AVRX : AVR EA : REPLY



    hi Przemek

    that would be great cheesey

  • BASCOM-AVR : Version Problem : REPLY



    Thank you very, very much. I tried your example and it works very well.
    I read your explanation, but I'm not entirely sure I understood everything. cheesey

  • BASCOM-AVR : Version Problem : REPLY



    here is an example.

    [code:1:2ebc070b94]
    $regfile = "m88pdef.dat"
    $crystal = 8000000

    $baud = 9600

    $hwstack = 50
    $swstack = 50
    $framesize = 60

    Declare Sub Serial0bytereceived()

    Config Serialin = Buffered , Bytematch = All , Size = 250

    '------------------------------------------------------------------------------
    'Config Portb.2 = Output
    'Rele1 Alias Portb.2

    'Config Portd.3 = Output
    'Dere Alias Portd.3
    'Reset Dere


    Dim Card_nr As String * 17
    Dim Card_nrx As String * 17

    Enable Interrupts
    '------------------------------------------------------------------------------
    Print "test isr"
    Dim B As Byte
    Dim Bstate As Byte

    Main:

    Do
    If Card_nrx <> "" Then
    Print Card_nrx
    Card_nrx = ""
    End If
    Loop
    End

    '------------------------------------------------------------------------------
    'complet RFID card Nr. in HEX: 02 0A 02 71 00 3E 99 26 F8 03
    Sub Serial0bytereceived()
    Select Case Bstate
    Case 0 'no data received yet
    If R25 = 2 Then
    Bstate = 2 'we got a header
    B = Waitkey() 'eat the header
    Card_nr = ""
    End If
    Case 2 'trailer received
    If R25 = 3 Then 'trailer or data byte
    If Len(card_nr) = 16 Then 'all ok
    Bstate = 3 'set state
    B = Waitkey() 'eat the trailer
    Card_nrx = Left(card_nr , 13) 'this var will be used in the main app
    Bstate = 0 'for the next
    Else
    Gosub Getthedata 'process data '
    End If
    Else
    Gosub Getthedata 'process the data
    End If
    End Select
    Exit Sub

    Getthedata:
    B = Waitkey() ' get data
    If Len(card_nr) < 16 Then
    Card_nr = Card_nr + Hex(b) 'add to string
    Else
    Bstate = 0 'reset
    End If
    Return

    End Sub
    [/code:1:2ebc070b94]

    there are many more ways, i would do it different but this is simple to get. R25 contains the value from the buffer. but take care that R25 can be destroyed later.
    the bstate is best set to 0 by the main app.
    but for this sample it was done inside the ISR.
    as you can see there is a check to see we do not catch byte data as header.

    for the reported problem i will extend the help.
    when there is lost of 'abuse' i can also change it back and make the better code an option. i do not know. most users do not actually read all things.
    When there is a bug/flaw we prefer to kill it. but of course for users it is important that their code still works.

| Date published: not known
Back to newsfeed list
Welcome
Username or Email:

Password:




[ ]
[ ]
Headlines

»Share your working BASCOM-AVR code here : Bar Graphs/progress bars : REPLY
I am working on having a box around the bar like we see on battery meters as soon as its working correctly so the size of the gra...
»Share your working BASCOM-AVR code here : Bar Graphs/progress bars : REPLY
hi Paul thank you for sharing :D A clever way to make bars with little resources since the bgf files are very small. woul...
»BASCOM-AVR : Fold function is not working. Unfold - OK. : REPLY
you should post an example code along with a screen of the editor. for me it always works.
»BASCOM-AVR : Fold function is not working. Unfold - OK. : NEWTOPIC
Hello, I'm writing to you to ask, if you also have a problem with fold/unfold function. I'm able to unfold code but not able t...
»BASCOM-AVR : Ariadne TCP/IP bootloader : NEWTOPIC
Hi, I needed a bootloader for my project that would work over TCP/IP. I found the Ariadne Bootloader, designed for Arduino projec...
»Share your working BASCOM-AVR code here : Bar Graphs/progress bars : NEWTOPIC
I wanted to draw bar graphs and a battery level indicator on 128 x 64 and 240 x 64 displays but wanted a simple versatile code co...
»BASCOM-AVR XTINY/MEGAX/AVRX : AVR EA : REPLY
[quote:56eb1ae269="programmista123"]Hello All! I've just looked into Microchip www and I can see that, they release new family:...
»BASCOM-AVR XTINY/MEGAX/AVRX : AVR EA : REPLY
hi Przemek that would be great :D
»BASCOM-AVR : Version Problem : REPLY
Thank you very, very much. I tried your example and it works very well. I read your explanation, but I'm not entirely sure I unde...
»BASCOM-AVR : Version Problem : REPLY
here is an example. [code:1:2ebc070b94] $regfile = "m88pdef.dat" $crystal = 8000000 $baud = 9600 $hwstack = 50 $swstac...


Date published: not known
Details

»Temperaturermittlung von NTC-Thermistoren
Hallo in die Runde, vor einigen Jahren habe ich mit der Software "Appomatox" ein Toolgenutzt, um mit Bascom aus einem ermittelten Widerstandswert d...
»RFID PN5180
Hallo, Hat mal jemad was mit den PN5180 basierten Rfid readern gemacht? Hier oder im Web find ich nichts in Bascom. Rc522 beispiele gibts viele, ab...
»ATXMega256 Stromaufnahme Diskrepanz
Hallo! Ich habe mich etwas eingehender mit der Stromaufnahme vom ATXMega256 auseinandergesetzt und bin teilweise auf Differenzen zu den im Datenb...
»Doppelnutzung von DS18B20 Temperatursensoren
Liebe Bascommer, ich möchte meine bivalente Heizung automatisieren. An der (selbst hinzugefügten) Wärmepumpe (WP) wurden dafür vorsorglich 4 Stück ...
»Attiny441 Über SPI grorammieren
Hallo Nach langer Zeit will ich mal wieder ein kleines Projekt mit einem ATtiny441 starten, habe diesen Typ noch nie eingesetzt und zerschelle glei...
»Piezo Ansteuern
Hallo Leute, immer wenn ich hier schreib, ist für mich Schicht im Schacht. Ich hab mir von Pollin solche Schlüsselalarm Teile besorgt (ähnlich wie ...


Date published: Fri, 08 Dec 2023 14:14:00 +0000
Details

»93c46 editor programmer bascom &amp; vb93c46 editor programmer bascom &amp; vb
»93c46 Bascom &amp; VB693c46 Bascom &amp; VB6
»Analog clock on SSD1289 3.2" 240x320 lcdAnalog clock on SSD1289 3.2" 240x320 lcd
»Nextion HMI lcd with KaraDio the best webradio esp8266Nextion HMI lcd with KaraDio the best webradio esp8266
»Adding 240x320 lcd to the WifiWebRadioAdding 240x320 lcd to the WifiWebRadio
»IV-17 Nixie clock GPS set time &amp; date at power onIV-17 Nixie clock GPS set time &amp; date at power on


Date published: not known
Details

»Bascom Can Bus Sniffer
»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...


Date published: not known
Details


Proudly powered by e107 which is released under the terms of the GNU GPL License.