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

Share your working BASCOM-AVR code here : Poor man's Rolex.... : REPLY

$
0
0
Yes. It must be so: [code:1:c8f932c8dd]'------------------------------------------------------------------------------- ' lookup voor dag van de week '------------------------------------------------------------------------------- Weekdays: 'Data "maandag" , "dinsdag" , "woensdag" , "donderdag" , "vrijdag" , "zaterdag" , "zondag" Data "Понедельник" , "Вторник" , "Среда" , "Четверг" , "Пятница" , "Суббота" , "Воскресенье"[/code:1:c8f932c8dd] In fact of the matter is that there are font8x12.font cyrillic characters: [URL=http://radikal.ru/F/s019.radikal.ru/i609/1304/69/2dbf393798c7.png.html][img:c8f932c8dd]http://s019.radikal.ru/i609/1304/69/2dbf393798c7t.jpg[/img:c8f932c8dd][/URL]

Share your working BASCOM-AVR code here : Poor man's Rolex.... : REPLY

$
0
0
[code:1:d1dfb714a2]For String_pos = 1 To Len(lcd_text) 'Für jedes Zeichen im String If Fontset = 2 Then Restore Font12x16 Else Restore Font8x12 End If Read Char_rows : Read Char_row_len : Read Char_bytes : Read Dummy 'Read the first 4 bytes from the font file [/code:1:d1dfb714a2] Almost everywhere in the code font 2 is used, that is the font12x16.font. So you will have to change the other font-file. Would be nice if you could publish a pictures of the finished clock in Russian. Have fun Ben Zijlstra

Share your working BASCOM-AVR code here : Poor man's Rolex.... : REPLY

BASCOM-AVR : XMEGA serial lost characters : REPLY

$
0
0
Hi Mark and all Guy, Sorry for the delay, but i was not in France and with very limited internet access. Yes, with small delay it's better, nearly 100%. but somme time one character is lost (now only one !!!). For information, result is better with Waitkey than Inkey with a test data<>0 For the test, i try (with success) to update an electronic's module (ATXMEGA128D3) located in an harbor at Hawai.(outside) Module have a radio Module Xbee-Pro 2.4GHZ 9600 Bauds inside, communicate to --> radio base with another Xbee-Pro connected in the harbor office to a Lantronix Module (IP adress - Port / serial). distance between base and module around 200m. There is 80 other modules on the site. The software to downloading is on a server in the office. I manage the software from France with a Teamviewer access. it's takes 6 minutes to download the software (32K) in the main program, there is an instruction to jump to the bootloader ($10000), only the module concerned receive this instruction (there is an identification in the serial communication to communicate only with the concerned module). include a display of DataCoCom software, it's like terminal, but include specific function like download softwrare (OSCAR, TEXAS, ALIX is the name of the modules ...) When test will be finished, ,i will posted the entire software (PC and Bascom boot). So, i never had problem with interrupts, if it's possible to have a $bootvector, it will be perfect. An exemple how i use serial commmunication, with interrupt, i create an buffer (buf) when charact 13 (CR) is received, a flagrx is on. In the main program i check the flagrx and read the buffer when i have time .... never lost character. of course, i must clean the buffer manually (when read is OK). [code:1:3f2c8871b5] Config Com1 = 9600 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8 Open "COM1:" For Binary As #1 On Usartc0_rxc Rxdata Enable Usartc0_rxc , Lo '------------------------------------------------------------------------------- Rxdata: Data_rx = Inkey(#1) If Data_rx = 13 Then Flagrx = 1 End If If Data_rx <> 0 Then Buf(rxptr) = Data_rx Incr Rxptr If Rxptr > 64 Then Rxptr = 64 End If End If Return [/code:1:3f2c8871b5] Patrick

BASCOM-AVR : Random output pin toggling : REPLY

$
0
0
Plenty of ideas, but nothing you cannot get by just looking in the Help at the RND function, plus how to set a port for output and set a bit within the port. Suppose you want to use portX, bit Y as output. Then something like this would work: [code:1:fa35351150] config portX.Y as output 'set port line for output dim wrandom as word 'define a word variable dim btemp as byte 'and a byte do 'loop forever wrandom = rnd(256) 'generate random number in range 0-255 portX.Y = wrandom.0 'assign bit 0 from number to port pin loop [/code:1:fa35351150]

BASCOM-AVR : XMEGA and 40*4 LCD : NEWTOPIC

$
0
0
Hi, I am trying my first attempt at XMEGA. I am using XMEGA256D3 I could do blinking LED. But can't make LCD work. The xmega is at 3.5 volt. LCD is at 5 volt. Will this work ? or must use level shifter ? ( I have seen this work in PIC. ) Is the library, $lib "lcd4E2.lbx" in avr samples directory suitable for xmega ? I am going to try 16*2 LCD now. But I need 40*4... I have done many projects in BASCOM 8051 and a few in mega32. I am using BASCOM AVR 2.0.7.6 Please suggest me. Regards, Devidas [b:65992fea10][color=red:65992fea10](BASCOM-AVR version : 2.0.7.6 )[/b:65992fea10][/color:65992fea10]

BASCOM-AVR : Atmega128a and DataFlash : NEWTOPIC

$
0
0
Hi All! Is it possible to handle built in DataFlash of Atmega128a with BASCOM? [b:ceff1afdfe][color=red:ceff1afdfe](BASCOM-AVR version : 2.0.7.6 )[/b:ceff1afdfe][/color:ceff1afdfe]

BASCOM-AVR Old versions : [ask] read sms in siemens c55 : REPLY

$
0
0
This does not use the print command ?

BASCOM-AVR : data loss using inkey #2 with software UART : REPLY

$
0
0
Thanks for the explanation, :idea: yes, I checked the help, but this is not so crystal clear, because in the description of the syntax there is no mention of this parameter, only in the examples section. So I thought I may try it with a variable <X> - and it failed - maybe <X> is indeed sent as data - but I could not see it on the terminal when checking, because it was < 04 > und thus no printable ASCII. Regarding the comma vs. semicolon between <Tx_buf(1)> and <X> - I am not so sure what I put in the first place, it could well have been a semicolon after the compiler complained ... Cheers, Johannes

BASCOM-AVR : True Type font problem! : NEWTOPIC

$
0
0
Hi i tried to used from font8x8tt.font for my ks108 LCD display. but it work same as font8x8.font . i want to define difference blank space for each character so i have to use from true type font. when i test my code it show same result for font8x8tt.font and font8x8.font [code:1:86f7140c1a] $regfile = "m32def.dat" $crystal = 11059200 $lib "glcdKS108.lib" Config Graphlcd = 128 * 64sed , Dataport = Portc , Controlport = Porta , Ce = 6 , Ce2 = 7 , Cd = 2 , Rd = 3 , Reset = 5 , Enable = 4 Cls Setfont Font8x8tt Lcdat 1 , 1 , "A!B" Setfont Font8x8 Lcdat 3 , 1 , "A!B" End $include "font8x8TT.font" $include "Font8x8.font" [/code:1:86f7140c1a] [b:86f7140c1a][color=red:86f7140c1a](BASCOM-AVR version : 2.0.7.3 , Latest : 2.0.7.6 )[/b:86f7140c1a][/color:86f7140c1a]

BASCOM-AVR Old versions : True Type font problem! : REPLY

BASCOM-AVR : data loss using inkey #2 with software UART : REPLY

$
0
0
[quote:cd6f09c3bc="jwolf"]because in the description of the syntax there is no mention of this parameter, only in the examples section.[/quote:cd6f09c3bc] Would you point out the exact place to find this use within the "examples section" ? In the help you can't find it for Printbin, but for Print, there it's valid. And from time to time it may happen that Mark extends a certain functionality, while this new functionality doesn't make it in the help. In such a case I first stick to the help, and if it's more important for me, I do a simulation to see what really happens.

BASCOM-AVR Old versions : [ask] read sms in siemens c55 : REPLY

$
0
0
Hi, of cause it use print command this is this it the AT commands you need to use

BASCOM-AVR : data loss using inkey #2 with software UART : REPLY

$
0
0
print and printbin have different purposes and different syntax. print was only extended with the , and an optional number of bytes, because it is required by the SPI. since it will not break code, it might be implemented for printbin/print too, but now it is only supported by the SPI.

BASCOM-AVR : Atmega128a and DataFlash : REPLY

$
0
0
maybe you can explain what you mean/want to do? you mean to read/write the flash code that is used to store the program?

Share your working BASCOM-AVR code here : RHT03 (DHT22) Sensor : REPLY

$
0
0
in case of a problem : always store the complete project code. then when you think you found the problem, report it to support. if there really is a problem we would like to know about it to fix it. and more important for you: what if your 'fix' is not a real fix and the problem returns?

BASCOM-AVR : XMEGA and 40*4 LCD : REPLY

$
0
0
Hi, Of course, xmega (3v3) is not diectly compatible with LCD in 5V. i use some "translator" 74VHC1VT50 and it's works perfectly. In attachement a part of sheet of exemple. (sorry the wiring is to be according with the CAO). 4 X 20 lcd i use same chip to interface other moduleS in 5V (RFID reader). Patrick

BASCOM-AVR : XMEGA and 40*4 LCD : REPLY

$
0
0
Thank you Patrick, This solved my first problem. That is I need a translator to convert my vcc (3.5 volt ) to 5 volt for LCD. I still require somebody to suggest about the 40 * 4 LCD library. Best Regards, Devidas

Share your working BASCOM-AVR code here : Decoding Sony Remote With Bascom AVR : REPLY

$
0
0
you can use the loop : for I=1 to 7 Pulsein Ir_pulse(i) , Pind , 2 , 0 Next I new loop : for i=0 to 6 ' Pulsein Ir_pulse(i+1) , Pind , 2 , 0 If Ir_pulse(I) < 100 Then Dbyte.I = 0 end if next this way you can remove the other code where you set the bit.

Share your working BASCOM-AVR code here : Decoding Sony Remote With Bascom AVR : REPLY

$
0
0
Yes, that's very good and clever :). It did not come to my head.
Viewing all 20555 articles
Browse latest View live


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