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

EASY TCP/IP : Ethernet Bootloader for Easy TCP/IP : NEWTOPIC

$
0
0
Hi, just a short question: is there any source code / demo code available for the above topic. Thanx in advance. Best regards, Mark

BASCOM-AVR : Uart0 RX pin must have a resistor connected to GND to work : REPLY

$
0
0
There is a well known problem with rxd0 on the atmega 1284p that requires a 100pf cap to ground. I,m not sure about the processor you are using. As others have suggested you may have an earthing problem but is more likely that your serial driver is not pulling the rxd low enough. Try a 1k then a 100 - 330 pf cap. ( 2 separate tests). That will tell you what the issue is

Various : Used Registers : REPLY

$
0
0
Hi Viacheslav, I tried to download your OBJDUMP.EXE, but the website is not responding... Please you can post the utility again ? Thanks ! Paulo

BASCOM-AVR : Xmega USART in SPI MODE - Please Help! : REPLY

$
0
0
To get a byte from a SPI-slave, the master needs to send a byte. By analyzing the code created for Inputbin, I can say it does not shift anything out, so it looks it is not implemented yet. It may work to send out one byte via Printbin and after fetch one byte via Inputbin. Receiving larger chunks of data will be slow this way and care has to be taken to flush the UART-MSPI input buffer before. There's no such functionality like in SPI (see Config SPIx), at least in version 2.0.7.7, so if you like to use UART-MSPI more efficiently, you need to write your own functions.

BASCOM-AVR : How to get value for EE label? : NEWTOPIC

$
0
0
Please help me with this. I build Menu with [b:504e63c334]Adr2[/b:504e63c334] . I moved strings to Eeprom and with [b:504e63c334]Readeeprom[/b:504e63c334] or "Value = Ee_string" is no problem but in Menu with addresses labels don`t work for Eeprom. If I wrote Readeeprom _string, Ee_string, everything work but adress for label to read i get from menu and this is " value of Label". Instr. "Loadlabel" work only if is placed after eeprom data. Please give me any idea to read value of [b:504e63c334]Label_2[/b:504e63c334] stored in eeprom. This sample now read second word because "Gosub Get_adres" is launched. I need read value of Label with Adr2 if they stored in Menu like Label_1 [code:1:504e63c334]'$sim Dim Eep_string As Eram String * 5 Dim _string As String * 5 Dim W As Word Config Lcd = 16x2 Dim Menupointer As Word Dim _menu_text As Word '--------------------------- Macro Restore_menu Loadadr Menupointer , X !LD R8,X+ !LD R9,X End Macro Macro Restore_tekst Loadadr _menu_text , X !LD R8,X+ !LD R9,X End Macro '--------------------------- '************* Do Cls Menupointer = Loadlabel(menu) 'fix to one Restore_menu Read _menu_text Restore_tekst Read _string Lcd _string Gosub Get_adres Readeeprom _string , W Lcd _string Waitms 500 Loop End '*************** Menu: Adr2 Label_1 'work for labels in code Adr2 Label_2 'not for EE label Label_1: Data "Hello " $eeprom Label_2: Data "World" $data Get_adres: W = Loadlabel(label_2) Return [/code:1:504e63c334] [b:504e63c334][color=red:504e63c334](BASCOM-AVR version : 2.0.7.7 )[/b:504e63c334][/color:504e63c334]

EASY TCP/IP : Web server - multiple access : NEWTOPIC

$
0
0
Hello, i made small web server but i found that multiple access at the same time is not possible. I tried launch website on two computers at the same time. Could you give me an idea how to fix it ?

EASY TCP/IP : Web server - multiple access : REPLY

$
0
0
you have only 1 socket listening. this means you can only server one client at the time. please have a look at the provided samples which use multiple sockets.

BASCOM-AVR : How to get value for EE label? : REPLY

$
0
0
Indeed loadlabel only works when the label is known. The reason for this is that when you use loadlabel(), the compiler first checks if the label is in the eeprom data area. If not, it assumes that it is inside the code area. But when the label is not used yet, the label can not be found and the value will point to some data in code. The solution is simple : Put the eeprom data before the loadlabel. Since data in area does not hurt you code in any way, it does not matter either that you place it at the begin of your code. you could also include it using $include.

Share your working BASCOM-AVR code here : Big digits on cheap Lcd loaded from eeprom : REPLY

$
0
0
Very nice sample of using a simple LCD in a neat way ! Instead of : !LDS _temp1,{My_temp} !Rcall _Lcd_control you can use : lcdcmd my_temp and for data you can use lcddata See also the help.

BASCOM-AVR : How to get value for EE label? : REPLY

$
0
0
Mark, he's looking for an EEProm-equivalent of [b:58cf3df3ef]Adr2[/b:58cf3df3ef], and not about putting $eeprom/$data in front of loadlabel(). You'll notice, that he already did that. The menu-example as shown under Adr2 in the help needs a way to resolve data's address and store it within the same data block, done there with Adr2. As there is no Adr2 equivalent for use within an $eeprom-block, the TO got stuck and frankly also I found no way to get around this limitation.

BASCOM-AVR : How to get value for EE label? : REPLY

$
0
0
I dont see a reason to use adr or adr2. adr2 would be used for data stored in code. this example works : $eeprom Label_2: Data "World" Label_3: data "test" $data dim w as Word ,s as String * 10 gosub Get_adres end Get_adres: W = Loadlabel(label_2) ReadEEprom s,w W = Loadlabel(label_3) ReadEEprom s,w Return but since the data is stored in eeprom, the byte address is returned.

BASCOM-AVR : How to get value for EE label? : REPLY

$
0
0
Yes. Thans for reply. But I don`t know how to pass label name from menu to Loadlabel. Without correct label compiler says "no label found". Is there a way to use Loadlabel like function once for all labels? If I can`t use labels in ee like in code then they are useles for me because code grows. I know exactly addresses of this strings but I`m thinking about "it will be nice to use labels ":D Why compiler can use labels to data in code without any problems, and for ee labels not? Adr2 ->Label in Ee = Not working (for me) :D

BASCOM-AVR : How to get value for EE label? : REPLY

$
0
0
[quote:4f2c67b711="albertsm"]I dont see a reason to use adr or adr2. adr2 would be used for data stored in code.[/quote:4f2c67b711] Adr2 is used to retrieve an address in flash memory and this address is written to flash memory a the very position of Adr. As far I understand the TO's intention, he wants to store text messages of his menu into eeprom and he needs to link these addresses to his menue. Your shown codes works for sure, but somehow I miss the point, how it should work within a menu similar to the sample filed under Adr. How would you comfortably link the labels for the stored text in eeprom to said menu-example? There would be a solution: The compiler knows, whether a label points to flash or eeprom, so if Adr points to an eeprom-label, the eeprom-address is written to this point in memory, if it points to a flash-label, a flash address is stored. If Adr is put within an $eeprom/$data block, the word-address is created within eeprom, otherwise in flash.

BASCOM-AVR : How to get value for EE label? : REPLY

$
0
0
[quote:c84b1ef7d4]Your shown codes works for sure, but somehow I miss the point, how it should work within a menu similar to the sample filed under Adr. How would you comfortably link the labels for the stored text in eeprom to said menu-example? [/quote:c84b1ef7d4] ADR and ADR2 work for code only. so the sample is irrelevant for EEPROM. But i finally :shock: understand the TS problem. Code labels are resolved by the assembler at a second pass. But since EEPROM data is just data and not handled by the assembler because it isnt object code, there is no second pass that will resolve the label. I will have a look at it.

BASCOM-AVR : How to get value for EE label? : REPLY

$
0
0
I don`t know`it so this not work like that for ee. I thought that this is due to my ignorance. My intention was spare code space and with this I spare 6% flash. Could be more..but, maybe, I simply rewrite code in another way. I can buy large uC but this not the case. I want "pack" more function to old, already finished, project.

BASCOM-AVR : Atmega128A - Uart0 & Uart1 not work : NEWTOPIC

$
0
0
Hello I have problem with Atmega128A and UART0 (PE0,PE1) and UART1(PD2,PD3). Program: [code:1:d550960989] $regfile = "m128def.dat" ' specify the used micro $crystal = 16000000 ' used crystal frequency $baud = 19200 ' use baud rate $hwstack = 32 ' default use 32 for the hardware stack $swstack = 10 ' default use 10 for the SW stack $framesize = 40 ' default use 40 for the frame space Do Print "Hello atmega" Loop [/code:1:d550960989] and [code:1:d550960989] $regfile = "m128def.dat" $crystal = 16000000 $baud = 19200 $baud1 = 19200 Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0 Config Com2 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0 Open "Com2:" For Binary As #1 Do Print "Hello atmega" Print #1 , "Hello atmega" Loop [/code:1:d550960989] Not work and i don't know why. Bascom version 1.11.9 programmer USBasp Thanks for your help. [b:d550960989][color=red:d550960989](BASCOM-AVR version : 1.11.9 , Latest : 2.0.7.7 )[/b:d550960989][/color:d550960989]

EASY TCP/IP : Web server - multiple access : REPLY

$
0
0
Hello bibibo I have a new blog in the blog section with a wiznet web server it uses the 4 sockets of the W5100 with the M128 it will work ok. It stores the TCPIP settings in eeprom and reads them from SD card or a rs232 command line and web page so they need not be hard coded but I still leave a default in the code. I regularly use 2 PCs to work with it so I can test it with different browsers. Regards Paul

BASCOM-AVR Old versions : Atmega128A - Uart0 & Uart1 not work : REPLY

$
0
0
Problem solved. fuse ATmega103 must set 0.

Share your working BASCOM-AVR code here : Fast library for SSD1289 LCD : REPLY

$
0
0
Hello! I'm just testing this library and it works perfect, from i see very fast, many thanks for it. However, i wonder, do you have any chance to extend library so it would read from SD card? Since it has SD card onboard, it would be nice to use it best regards, Paul

BASCOM-AVR : RFID Reader : REPLY

$
0
0
Hi, I have spent many houres trying to get some hints around handling this MFRC522. I found out, that this chip is most common for all Mifare readers/writers that you can buy world wide. But, to get working code is almost impossible. Therefore I choose this product and it works fine: http://www.stronglink-rfid.com/en/rfid-modules/sl031.html Best regards/ Lep pozdrav! Andrej
Viewing all 21191 articles
Browse latest View live


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