Quantcast
Channel: MCS Electronics Forum
Viewing all 20565 articles
Browse latest View live

BASCOM-AVR : Config Timer1 with optional parameter : REPLY

$
0
0
did a quick test and indeed something is not right, at least for this processor. I will have it fixed.

Share your working BASCOM-AVR code here : 1.3inch 65K FullColorLCD 240x240dot [ST7789V] : REPLY

$
0
0
Hello O-Family, Thank you for this lib. Indeed these small lcd are good for many projects. Thanks for the clear circuit and sample code :D

BASCOM-AVR : AVRISP II STK500.exe serial not recognized : REPLY

$
0
0
is this new? this wasnt necessary before.

BASCOM-AVR : AVRISP II STK500.exe serial not recognized : REPLY

$
0
0
You are now trying to setup the MKii with a serial port, and the Mkii isn't a serial port. Have a look in windows device manager and see is not a serial port. And why update your pc to win7? Win7 is end of life 14-01-2020.

Share your working BASCOM-AVR code here : Proportional Fonts for GLCDs + TrueType Converter : REPLY

$
0
0
The problem was the data size of some characters exceeded 256 bytes which was not handled correctly by the converter/library. Although I do not have your font, I could recreate (and then solve) the problem using Arial Black 72pt. The big font must be exportet again using the new version, existing older font files remain compatible. [b:0d30ec6888]New in Version 1.4[/b:0d30ec6888] [list:0d30ec6888]* Added support for big character fonts (character data size > 256) * Small performance improvements[/list:u:0d30ec6888] The FontConverter update function should work, download is on the wiki page. When overwriting previous text, space characters (or any other character) don't work, because only the set pixels are drawn, background is left out intentionally (to write text over non-uniform backgrounds). If you want to clear the area containing the text, you could use the function Lcd_tt_width("Text") to get the width of the text in pixels and then draw a rectangle over it, I've added a small example to the wiki page.

BASCOM-AVR : AVRISP II STK500.exe serial not recognized : REPLY

$
0
0
Exactly. its end of life 2020. I'm not installing Win10, losing performance, if I dont have to. So installing the jungo drivers with the avr studio is the issue? I had this working with win7 and without the filter driver before...

BASCOM-AVR : DT-06 Serial to WiFi : NEWTOPIC

$
0
0
Hello dear reader! Recently I bought several DT-06 (serial to WiFi) converters. In my local network they do their job as expected. Now I do want to use a client/server pair of these converters to communicate between two Bascom programs running on two different M328 - without any other local network. Has anybody here dealt with these units? Thank you dj7da [b:9befa78493][color=red:9befa78493](BASCOM-AVR version : 2.0.8.1 )[/b:9befa78493][/color:9befa78493]

BASCOM-AVR : With Powerdown the Timer1 don't run : NEWTOPIC

$
0
0
Hello, Atmega88PA and Bascom 2.0.8.1 If i use Config Powermode= idle, my programm works fine, it wake up with INT0, and the Timer1 works (consuming 1mA) If i use Config Powermode= Powerdown, my programm wake up with INT0, but the Timer1 NOT run (consuming 0.04mA) I need save much power as possible, how use sucessfull the Powerdown? Thank for help Best regards P_Santos [b:7fb2587fd6][color=red:7fb2587fd6](BASCOM-AVR version : 2.0.8.1 , Latest : 2.0.8.1 )[/b:7fb2587fd6][/color:7fb2587fd6]

BASCOM-AVR : With Powerdown the Timer1 don't run : REPLY

$
0
0
[quote:3ec6568bde="P_Santos"]my programm wake up with INT0, but the Timer1 NOT run (consuming 0.04mA)[/quote:3ec6568bde] Surprisingly the data sheet shares the same opinion, in particular that the timers won't run while in Powerdown. [quote:3ec6568bde]how use sucessfull the Powerdown?[/quote:3ec6568bde] Never - in case the timer needs to run. Timers and external Interrupts will run however in Powersave, additionally there's a register called PRR, which can turn off integrated units which are not required within Powersave state.

BASCOM-AVR : With Powerdown the Timer1 don't run : REPLY

$
0
0
Hello MWS, Have reprogramm it, now no Timer and works with Powerdown Regards P_Santos

BASCOM-AVR : Atmega 328p How reset by software ? : NEWTOPIC

$
0
0
Hi friends; I am newbie in the AVR world... (coming from PicBasic Pro...) Did someone have a code that could reset the ATmega 328p by software ? Thanks for any help [b:d82b84688e][color=red:d82b84688e](BASCOM-AVR version : 2.0.8.1 )[/b:d82b84688e][/color:d82b84688e]

BASCOM-AVR : Atmega 328p How reset by software ? : REPLY

$
0
0
Hello acjacques I use this to go to the boot vector via a serial port so I can load new code into the M168 over RS232 if I get 123 sent to the serial port it jumps to the boot vector Regards Paul [code:1:d1078a1ce9] Config Serialin0 = Buffered , Size = 20 , Bytematch = 123 Serial0charmatch: Cls Lcd "BOOT VECTOR" Wait 1 'here you need to read the data sheet 'to find the correct address Goto &HC00 Return [/code:1:d1078a1ce9]

BASCOM-AVR : With Powerdown the Timer1 don't run : REPLY

$
0
0
[quote:97cab691f2="P_Santos"]Have reprogramm it, now no Timer and works with Powerdown[/quote:97cab691f2] Your starting post did not sound as if this would be an option.

BASCOM-AVR : Atmega 328p How reset by software ? : REPLY

$
0
0
Here you have. Now you can add more "AT" commands but this basic code react for "AT+RST". You can use it for debug/reseting over Bascom,or any other, terminal emulator , or even use it with MCS Bootloader. [code:1:40d8a6bfe0]$regfile = "m328pdef.dat" $crystal = 16000000 $hwstack = 64 $swstack = 16 $framesize = 64 $baud = 115200 Const Buffs_len = 50 '***************************************************************** '* CONFIG BUFFERED USART FOR DEBUG via USB * '***************************************************************** Config Serialin0 = Buffered , Size = Buffs_len 'RX from Terminal Dim Char As Byte , Cmd_timeout1 As Byte , Got_str As Byte Dim Command1 As String * Buffs_len Open "COM1:" For Binary As #1 Const Usb = 1 '***************************************************************** '* TIMER2 FOR TIME BASE * '***************************************************************** Config Timer2 = Timer , Prescale = 1024 , Clear_timer = 1 Compare2a = 155 '10ms @16MHz/1024 '***************************************************************** '* VARIABLES * '***************************************************************** 'general purposes Dim Tempb As Byte ' ---------------------------- '| PROGRAM START | ' ---------------------------- Enable Interrupts ' for serial receiving in the background interrupt Do '--[ USART0 COM1 USB ]------------------------ If 0 < Ischarwaiting(#usb) Then Char = Inkey(#usb) Select Case Char Case 10 : Got_str = 1 Case 13 : 'swallow Case Else Command1 = Command1 + Chr(char) End Select If Len(command1) > 49 Then Got_str = 1 'force parsing If Got_str = 0 Then Cmd_timeout1 = 50 '50x10ms 'end if Ischarwaiting End If '--[ PARSE COM1 USB ]------------------------- If Got_str = 1 Then '------------------------------------- Tempb = Instr(command1 , "AT+RST") If Tempb > 0 Then Print #usb , "Reseting in progress..." Disable Interrupts Config Watchdog = 16 'set shortest time Start Watchdog 'always strt WD after config Do : Loop 'wait for reset in neverending loop End If '------------------------------------- Got_str = 0 Command1 = "" Cmd_timeout1 = 0 End If '--[ TIMER2 10ms ]---------------------------- If Tifr2.ocf2a = 1 Then Tifr2.ocf2a = 1 'COM1 USB If Cmd_timeout1 > 0 Then Decr Cmd_timeout1 If Cmd_timeout1 = 0 Then 'Got_str = 1 'force parsing Command1 = "" 'or clear trash End If End If End If Loop End[/code:1:40d8a6bfe0] [img:40d8a6bfe0]https://www.mcselec.com/userpix/22760_bascom_terminal_1.jpg[/img:40d8a6bfe0] [img:40d8a6bfe0]https://www.mcselec.com/userpix/22760_bascom_bootloader_1.jpg[/img:40d8a6bfe0]

BASCOM-AVR : Atmega 328p How reset by software ? : REPLY

$
0
0
When I want to restart a prog , I use goto 0 look at the help "Besides using a label you can also specify an address. GOTO &H0000 would jump to the reset vector of the processor. " JP :wink:

BASCOM-AVR : With Powerdown the Timer1 don't run : REPLY

$
0
0
Hello MWS, I like always for more timing precision, work with Timer, but have write the programm and on the tests i try the diverse Powermode and only the Idle works correct with Timer, now, is this case, the precision is no very important and it works Thanks for your help Regards P_Santos

BASCOM-AVR : Atmega 328p How reset by software ? : REPLY

$
0
0
A GOTO 0 or GOTO _RESET is a soft reset. It will just start the code from the start. It will not put the hardware registers in their default. Using the watchdog like EDC demonstrates is a hard internal reset. This does reset the hardware registers too.

BASCOM-AVR : Display Double type on LCD not in scientific format : NEWTOPIC

$
0
0
I am using V 2.0.8.1 I have a Double type variable that I want to display on a 2x20 Character LCD. LCD dVar displays the variable in Scientific Format. I want to display the variable in Normal format. I see that there is a Config Single = Normal; but there does not appear to be a similar command for the Double type. I see that one can Format a Single type variable using Fusing, but that also appears to not support the Double type. Perhaps there is a built-in parameter or command to convert a Double type variable to a String type variable in Normal, (non-Scientific) format? Thank you, Jay [b:b6a3aaad69][color=red:b6a3aaad69](BASCOM-AVR version : 2.0.8.1 , Latest : 2.0.8.1 )[/b:b6a3aaad69][/color:b6a3aaad69]

BASCOM-AVR : Display Double type on LCD not in scientific format : REPLY

BASCOM-AVR : Display Double type on LCD not in scientific format : REPLY

$
0
0
Hi Mark, Thank you for your super fast reply! Not a problem, I was just looking for the "easy" solution. Guess I'll have to write my own... Thank you Jay
Viewing all 20565 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>