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

This page ever ...
total: 216
unique: 147

Site ...
total: 3857
unique: 2102
Online
  • Guests: 3
  • Members: 0
  • Newest Member: ole
  • Most ever online: 47
    Guests: 47, Members: 0 on Wednesday 21 February 2018 - 23:52:15
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
1 year ago
test
Royalsystems blog

MCS Electronics Forum

  • BASCOM-AVR : problem with 40x4 LCD : REPLY



    sorry I read to fast . Now I use only Nextion graphic display it takes only 2 pins from µC

    but are you sure of your code ?


    [code:1:10cf151f92]Fourthline
    Locate 2 , 2[/code:1:10cf151f92]
    When you "locate 2" you mean line 2, why did you use Fourthline ?

    JP :wink:

  • BASCOM-AVR : problem with 40x4 LCD : REPLY



    Yes, this works but only with LCD 20X4. With LCD 40x4 (with 2 EN lines) it displays only the last 3 lines and also in the wrong way exactly as it happens to me when not using the lcd4e2.lbx library which is made to manage the two EN lines. But if I use this library the display doesn't show anything ...

  • BASCOM-AVR : problem with 40x4 LCD : REPLY



    hi
    this code works for all port
    [code:1:f700c263c3]
    $sim
    '__ serial port----------------------------------
    Config Com1 = 115200 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0 '9600 115200
    Echo Off
    Config Serialin0 = Buffered , Size = 15 'jaune
    Config Serialout0 = Buffered , Size = 15 'RX from Terminal vert comme vert usbserial lignt df robot le TX va a tx
    Open "COM1:" For Binary As #1

    Enable Interrupts

    '---lcd --------------------------------------------------------------------
    Led Alias Porta.6
    Buzzer Alias Porta.7
    Config Lcdmode = Port
    Config Lcdpin = Pin , Db4 = Porta.2 , Db5 = Porta.3 , Db6 = Porta.4 , Db7 = Porta.5 , E = Porta.1 , Rs = Porta.0
    Config Lcd = 20 * 4
    Config Buzzer = Output
    Config Led = Output

    Dim Ischar As Byte
    Dim Rxbyte As Byte
    ' constant---------------------------------------------------------------
    Const Notedo = 2548
    Const Durdo = 300
    '-----------variables-----------------------------------------------------
    Dim Jbyte As Byte
    'testled
    For Jbyte = 1 To 4
    Set Led
    Waitms 200
    Reset Led
    Waitms 200
    Next
    Cls
    Wait 1
    ' test lcd
    Locate 1 , 1 : Lcd "123456789A123456789A"
    Locate 2 , 1 : Lcd "123456789B123456789B"
    Locate 3 , 1 : Lcd "123456789C123456789C"
    Locate 4 , 1 : Lcd "123456789D123456789D"
    [/code:1:f700c263c3]
    it is part of a program but I test My led, and my LCD before anything else
    JP :wink:
    it works with arduino too

    [img:f700c263c3]https://www.mcselec.com/userpix/115_20211026_185615_1.jpg[/img:f700c263c3]

  • BASCOM-AVR : problem with 40x4 LCD : NEWTOPIC



    HI to all.
    I have a problem with a 40X4 LCD (maybe only for the simulation).
    I am using version 2.0.8.4 of the compiler and a chip ATMEGA328.
    After going crazy with a source that I'm writing and, not having the hw at hand, I'm trying to simulate the lcdcustom4bit2e.bas example that uses the lcd4e2.lbx library.
    I have followed everything indicated and what I have found so far on the internet but absolutely nothing continues to appear on the LCD.
    The doubt is that in this case it is not possible to simulate. Nobody has any news about it or a piece of code that is really complete and working even in simulation?
    here my code


    [code:1:a6d7b5a9f9]
    $lib "lcd4e2.lbx"
    $regfile = "m328pdef.dat"
    $crystal = 16000000
    $baud = 9600
    $hwstack = 32
    $swstack = 10
    $framesize = 40

    Dim ___lcde as bit

    Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 , E = Portb.2 , Rs = Portb.0, E2 = portb.3

    Config Lcd = 40x4

    ___lcde = 0
    Initlcd
    Cls
    Upperline
    LOCATE 1,1
    Lcd "1"
    Lowerline
    LOCATE 2,1
    Lcd "2"
    Cursor Off
    ___lcde = 1
    Initlcd
    Thirdline
    Locate 1 , 2
    Lcd "3"
    Fourthline
    Locate 2 , 2
    Lcd "4"
    Cursor Off
    End

    [/code:1:a6d7b5a9f9]


    Thanks in advance

    [b:a6d7b5a9f9][color=red:a6d7b5a9f9](BASCOM-AVR version : 2.0.8.4 )[/b:a6d7b5a9f9][/color:a6d7b5a9f9]

  • BASCOM-AVR : help about UPDI and Xtiny, Avr128DB28 : REPLY



    [quote:779457b0d6="Duval JP"]@MWS I try on this forum to answer questions that users ask, not to return questions.[/quote:779457b0d6]
    Asking the correct questions is my way to help, if it's not up to your taste, then wait for other replies.
    [quote:779457b0d6]Good thing I don't wait for your sarcastic answers.[/quote:779457b0d6]
    Sarcasm served as still friendly hint to.have you think about your 'bohoohohooo, it's broken, help me'.
    Your a longtime user of this forum to know better.
    [quote:779457b0d6]And hooray my little assembly works very well.[/quote:779457b0d6]
    Is this the answer to my questions?
    Then they seem to have helped, and would it be only by making you double check the hardware.

    Besides, decoupling capacitors are completely missing, 4.2 page 21 of the data sheet.

  • BASCOM-AVR : help about UPDI and Xtiny, Avr128DB28 : REPLY



    @MWS I try on this forum to answer questions that users ask, not to return questions.
    I would have liked a simple schematic and a simple piece of code
    Good thing I don't wait for your sarcastic answers.

    On my breadboard I had a bad ground contact
    And hooray my little assembly works very well. For the future users I drew the principle. sorry no time to use proteus
    [img:8c72524aa8]https://www.mcselec.com/userpix/115_updi_usb_principe_1.jpg[/img:8c72524aa8]

    and the code
    [code:1:8c72524aa8]
    'name : AVRX128db28-test.bas modified for simple led test JP Duval
    'copyright : (c) 1995-2021, MCS Electronics
    'purpose : demonstrates AVR128DB28
    'micro : AVR128DB28
    'suited for demo : Yes now
    'commercial addon needed : yes
    '--------------------------------------------------------------------------------
    $regfile = "AVRX128db28.dat"

    $crystal = 24000000
    $hwstack = 40
    $swstack = 40
    $framesize = 40

    'The AVRX series have more oscillator options
    Config Osc = Enabled , Frequency = 24mhz
    'set the system clock and prescaler
    Config Sysclock = Int_osc , Prescale = 1


    Led Alias Portd.7
    Config Led = Output

    ' test port
    Dim , Jbyte As Byte

    Do
    For Jbyte = 1 To 4
    Set Led
    Waitms 400
    Reset Led
    Waitms 400
    Next
    Wait 1
    Loop
    End[/code:1:8c72524aa8]

    then the result[img:8c72524aa8]https://www.mcselec.com/userpix/115_P1040759_1.jpg[/img:8c72524aa8]


    JP :wink:

  • BASCOM-AVR : help about UPDI and Xtiny, Avr128DB28 : REPLY



    [quote:97ec615dcd="Duval JP"]my first tests are disastrous[/quote:97ec615dcd]
    It must have taken you ages to learn from your students how to pose questions that hold so little content.
    Did you forget how this forum works?
    Where's your code, where's your schematic, what hardware, what does not work, compiling, flashing or code execution?

  • BASCOM-AVR : help about UPDI and Xtiny, Avr128DB28 : REPLY



    Hi
    Mark's demos aren't working?
    RS

  • BASCOM-AVR : help about UPDI and Xtiny, Avr128DB28 : NEWTOPIC



    hi all
    I received my avr128DB28 , I looked for 1 simple example in the samples to try my updi interface, I have FTDI, and CP2102) but I didn't find anything that would suit me and that would be suitable for beginners with this µP series
    -Turn on a diode ,
    or
    - send "hello word" on a LCD display

    if someone could help me, the doc is 660 pages long, to turn on a diode it's a lot to read :wink:

    many thanks
    I have the XTiny lib

    my first tests are disastrous :cry:
    JP


    [b:5ae20e9db7][color=red:5ae20e9db7](BASCOM-AVR version : 2.0.8.4 )[/b:5ae20e9db7][/color:5ae20e9db7]

  • BASCOM-AVR : EEProm problem : REPLY



    I use a Eram Array for such variables.
    This makes it easy to read the default as it is a variable.

    RegardsPaul

    [code:1:e79b3b6931]


    Dim Defaults(10) As Eram Byte
    Dim A As Byte
    Dim B As Byte

    A = 0 'Key OFF
    Defaults(1) = A

    A = 1 'Key On Board
    Defaults(2) = A

    A = 1 'Key On Route
    Defaults(3) = A

    A = 0 'Key On Shore
    Defaults(4) = A

    A = 20 'Current Limit at 20A
    Defaults(5) = A

    A = 1 'Limit type Normal
    Defaults(6) = A

    A = 1 'Lock down
    Defaults(7) = A


    'Now to find the current limit

    B = Defaults(5)

    ' variable B now will have the value of 20



    [/code:1:e79b3b6931]

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

Password:




[ ]
[ ]
Headlines

»BASCOM-AVR : problem with 40x4 LCD : REPLY
sorry I read to fast . Now I use only Nextion graphic display it takes only 2 pins from µC but are you sure of your code ? ...
»BASCOM-AVR : problem with 40x4 LCD : REPLY
Yes, this works but only with LCD 20X4. With LCD 40x4 (with 2 EN lines) it displays only the last 3 lines and also in the wrong wa...
»BASCOM-AVR : problem with 40x4 LCD : REPLY
hi this code works for all port [code:1:f700c263c3] $sim '__ serial port---------------------------------- Config Com1 = 115...
»BASCOM-AVR : problem with 40x4 LCD : NEWTOPIC
HI to all. I have a problem with a 40X4 LCD (maybe only for the simulation). I am using version 2.0.8.4 of the compiler and a ch...
»BASCOM-AVR : help about UPDI and Xtiny, Avr128DB28 : REPLY
[quote:779457b0d6="Duval JP"]@MWS I try on this forum to answer questions that users ask, not to return questions.[/quote:779457b0...
»BASCOM-AVR : help about UPDI and Xtiny, Avr128DB28 : REPLY
@MWS I try on this forum to answer questions that users ask, not to return questions. I would have liked a simple schematic and a...
»BASCOM-AVR : help about UPDI and Xtiny, Avr128DB28 : REPLY
[quote:97ec615dcd="Duval JP"]my first tests are disastrous[/quote:97ec615dcd] It must have taken you ages to learn from your stud...
»BASCOM-AVR : help about UPDI and Xtiny, Avr128DB28 : REPLY
Hi Mark's demos aren't working? RS
»BASCOM-AVR : help about UPDI and Xtiny, Avr128DB28 : NEWTOPIC
hi all I received my avr128DB28 , I looked for 1 simple example in the samples to try my updi interface, I have FTDI, and CP2102)...
»BASCOM-AVR : EEProm problem : REPLY
I use a Eram Array for such variables. This makes it easy to read the default as it is a variable. RegardsPaul [code:1:e79b...


Date published: not known
Details

»Variable Eingang zuweisen etc.
Grüße euch. Ich möchte 2 Reedkontakte nutzen um 2 Eingänge zu prüfen ob sie High oder Low sind. Ich hab jetzt schon einiges probiert aber es geht ...
»IR-Transistor gibt "falschen" Pegel aus.
Moin Ich stehe vor einem Rätsel, was ich nicht selbst lösen kann. Derzeit bin ich dabei ein RC-Signal per IR-Brücke pbertragen zu wollen. Dafür neh...
»Loop Until Schleife wird zu früh verlassen.
Anbei der abgespeckte Programmtiel, in dem der Fehler auftritt. Mittels einer IR-Fernbedienung sol ein Stepper dabei im Schrittbetrieb betrieben we...
»Menüleiste Schriftgröße v 2.0.8.4
Hallo, gibt es in der neuen Version 2.0.8.4 von BASCOM eine Möglichkeit, die Schrift der Menüleiste (Menüs), wieder auf eine lesbare Größe zusetze...
»PWM mit dem ATMega 2560- was mache ich falsch?
Hallo, ich versuche gerade auf dem Pin Pinl.3 ein PWM Signal auszugeben, aber es funktioniert nicht. BASCOM-Quellcode (3 Zeilen)So richtig blick...
»Timer xmega Prescale ignoriert: Bug oder nicht...?
Hallo, in den letzten drei Stunden habe ich mich mit diesem Problem auseinandergesetzt. Ist das ein Bug oder soll das so? Wenn ich Generate_bug auf...


Date published: Wed, 27 Oct 2021 09:27:08 +0000
Details

»93c46 editor programmer bascom & vb93c46 editor programmer bascom & vb
»93c46 Bascom & VB693c46 Bascom & 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 & date at power onIV-17 Nixie clock GPS set time & 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.