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

BASCOM-AVR : XMega USB Support : REPLY

$
0
0
[quote:ef5f0f565f="albertsm"]I will send you an email.[/quote:ef5f0f565f] Good afternoon. This library can get the rest? Or only those who purchased the old version? :oops:

BASCOM-AVR : Bascom screen resolution : REPLY

$
0
0
maybe you can post a screen shot? you can try : - chose , help about - click xml data folder link - exit bascom - remove the bascavr.xml file (or rename it)

BASCOM-AVR : Bascom screen resolution : REPLY

$
0
0
After some struggle, I managed to cure it. I had a black windows desktop background. After I changed this to the default 'blue' Windows background, by miracle the resolution of the Bascom Window is now the same as set in the screen resolution. Very weird, but it did the trick. Note that this was not a Bascom issue but a Windows issue, as some other programs also popped up in low resolution at first. Thanks for the suggestion though.

BASCOM-AVR : detection rotation direction using Encoder function : REPLY

$
0
0
It might not be the exact answer to your problem but maybe it will help . To read an encoder and to make sure you do not miss steps , get external hardware to do it for you . Use a LSm7366 . You have quite a few options with this chip and spi read is very fast . I also had the problem to save the last value on power down , and even to count pulses if the rest of the unit is off . This can be done if you add batt backup to the counter chip but have not tested it . Depending on your application you might also consider a AS5600 12 bit / rot magnetic sensor ABSOLUTE value - it works like magic . ( They also have a 14 bit unit , but no I2C output .) You can read the angle value by I2C so it is all digital - AND the value is also available as 0-5 v out of the chip . I use the AS5600 over CANOPEN and it works fine , best is you switch on the unit and you know exactly where it is . You can also repgm the 12 bit over any angle to a min of 18 deg . If a single rotation is not enough you can scale it with a mechanical link. Software decoding and counting of high count optical encoders , like you see on high priced servo units costing lots of $$ , will bite you in the ... There is a servo amp application on the net , the code is all in ASM and it works fine , but then that is all it need to do - no lcds ' or eeprom save etc. Regards Nico

BASCOM-AVR : CanOpen : REPLY

$
0
0
Hi Yes , use a AT90CANxx , Bascom makes it super easy to interface with CANopen . We use it with Festo and Schneider plc as digital i / o and a to d input / output . CanOpen is not a big deal - it looks very complicated but once the node is active - it is just pumping out data - in the case of a sensor anyway , you do not even need to activate the node from the master - it can "auto start " after power on and start to send or receive packets from the master . You will need to create an xxx. EDS file to load in your PLC pgm ( Codesys in my case ) , but use an existing file from a similar product and change the required fields to suit your need . Make sure you have a lot of coffee ... Here is the part of code that send the data to the host . If Intcycletmr = 0 Or Encoderchange = 1 Then Config Canmob = 9 , Bitlen = 11 , Idtag = Txpo01docid , Msgobject = Disabled , Msglen = 2 , Clearmob = No Bok = Cansend(9 , Angle , 2) Intcycletmr = 100 End If End If In this case , I update the value once per sec if no change detected , but send new data as fast as I can when there is a change - with an inhibit time to prevent one node flooding the bus . Cheers

BASCOM-AVR : over range Compare : NEWTOPIC

$
0
0
Hi I need to check if a value changed , but only if more than say 2 or 3 , to eliminate sensor noise etc , any faster / better ideas . at the moment i use : Deltad = value - Lastvalue Delta = Abs(deltad) If Delta > 3 Or Opt3last <> Limitprox Then Enchange = 1 else Enchange = 0 End If Lastvalue = value Cheers [b:ae02d37073][color=red:ae02d37073](BASCOM-AVR version : 2.0.7.8 )[/b:ae02d37073][/color:ae02d37073]

BASCOM-AVR : CanOpen : REPLY

$
0
0
Hello nicofer, Thank you. In my case i want change from RS485 to CanOpen I have a Master and 33 Slaves. The Master send sequential 17 bytes to the slaves, init the circular scan with slave ID1 The slave that have the right ID replay back data if it have new events to inform the Master, if not, it not respond and the Master send another 17 bytes to the next Slave ID, and so on.. I read that with CanOpen it only possible to send and receive max 8 bytes at time, it that true, do you know? Best regards P_Santos

BASCOM-AVR : CanOpen : REPLY

$
0
0
Hi The idea behind any bus system - serial or mod or profi ... is to keep the data time on the bus to the minimum . So - the question is , what is the 17 bytes for - maybe you do not need to send all 17 bytes in the canopen format , but even if you have to , you can send it as multiple data packets or SDO 's . They are always 8 bytes in length but can carry only 4 " user data " bytes - so if you need to send more than 4 it just take a bit longer but still possible . Is the node id in your RS485 part of the 17 bytes , in CAN the node id is not part of the 8 bytes but is part of the complete data packet sent . you just get the data bytes in the MOB registers in the AVR or in the PLC depending how it was set up . I am by no means a CAN open expert , so correct me if I am wrong or inaccurate. Cheers

BASCOM-AVR : The display with the controller ST7855 : NEWTOPIC

$
0
0
Hello. Is there any library Bascom handle the display with the controller ST7588 in SPI mode? [b:5ed0cb9ddc][color=red:5ed0cb9ddc](BASCOM-AVR version : 2.0.7.8 )[/b:5ed0cb9ddc][/color:5ed0cb9ddc]

BASCOM-AVR : over range Compare : REPLY

$
0
0
Hi Why not just drop the lowest 2 bits before comparing [code:1:c1a1f67584] reset Value.0 reset Value.1 if Value <> Old_value then ..... [/code:1:c1a1f67584] That should be alot quicker than a subtraction and a abs but it won't work for floats. Regards Ian Dobson

BASCOM-AVR : over range Compare : REPLY

$
0
0
Hi Now that is a cool plan , never thought of it . thanks . Cheers

BASCOM-AVR : over range Compare : REPLY

$
0
0
Hi, My method won't be super accurate. For example if you have the value 8 and it changes to 7 the compare will be true (1000 -> 0111). Depending on how fast you Signal changes/what you want to do with the value, it might be better to just smooth (average) the value. Regards Ian Dobson

BASCOM-AVR : SSD1306 oled bgf picture display : NEWTOPIC

$
0
0
Hello, I would like to display included bgf pictures using the hkipniks Oled SSD1306 SPI code. link: http://bascomforum.de/index.php?thread/120-ssd1306-oled-display-1-3-i2c-spi/ I tryied use the code from Stefan, but I was not able to open included bgf file. link: http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=8283&highlight=bgf+format Can anyone help me with that. Do I need AVR-DS library? Thanks, Pzx [b:259fd18740][color=red:259fd18740](BASCOM-AVR version : 2.0.7.8 )[/b:259fd18740][/color:259fd18740]

BASCOM-AVR : over range Compare : REPLY

$
0
0
Hi , The plan is just to print a value if it changed but only if it changed by more than a dela value . The values are between 0 and 4095 Cheers

BASCOM-AVR : over range Compare : REPLY

$
0
0
Hi, And what data types are your variables (word, integer, single, double)? If you only want to print something when the value changes more than a fixed Delta ny idea wont work, But let me think about it. Regards Ian Dobson

Various : Html Problem : REPLY

$
0
0
I'm also curious about how to do that because i want to input SSID and Password from page to ESP8266, on internet there are lots of samples how to get something from internet to ESP8266 but there no info about that how to get info from page to ESP8266 :) if anyone have any info i would be grateful :) Best Regards George2002

BASCOM-AVR : SSD1306 SPI Oled bgf picture display : REPLY

$
0
0
Hey. What about using forum searchengine with inquiry "SSD1306" You will find already maked optimised asm library for this display maded by Mrshilov :D [url=http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=13641&highlight=ssd1306]This link[/url] take You there ;) About writing this in Basic you dont need to use AVR-DOS and BGF can be stored in uC flash memory with easy. BGF is encoded RLE for less code binary file. So all what is needed is use [b:788ee5695d]Restore[/b:788ee5695d] Some_example_label and then use [b:788ee5695d]Read[/b:788ee5695d] sequentially bytes till picture end. In two first bytes header in BGF picture height and width is stored.

BASCOM-AVR : SSD1306 SPI Oled bgf picture display : REPLY

$
0
0
Thanks for your fast replay, as usuall EDC :) You are right, that would be the best way, but unfortunately Mrshilov SSD1306 SPI-4 and SPI-3 library does not work with my display. The screen remains black. Link to the display: http://www.waveshare.com/1.3inch-oled-b.htm I tryied with Mrshilov bas and libs from the link: http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=13550&highlight=ssd1306 and after changindg display config into SPI-3: http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=13641&highlight=ssd1306 My Oled does not work with the above codes, but works well with hkipniks Oled SPI code (link in my first post) Port config of my ATMEGA 2560 is as follow: 'Config for hkipniks code: 'Config Portb.0 = Output 'DISPLAY_SS CS 'Config Portk.5 = Output 'DISPLAY_RS D/C 'Config Portb.2 = Output 'Spi_mosi D1 'Config Portb.1 = Output 'SPI_SCK D0 'Config Portk.6 = Output 'DISPLAY_Reset 'Config for Mrshilov SPI-4 code: $lib "glcdSSD1306-SPI.lib" Config Graphlcd = 128x64sed , A0 = Portk.5 , Si = Portb.2 , Sclk = Portb.1 , Cs1 = Portb.0 , Rst = Portk.6 'Config for Mrshilov SPI-3 code: $lib "glcdSSD1306-SPI-3.lib" Config Graphlcd = 128x64sed , Si = Portb.2 , Sclk = Portb.1 Reset = +5V CS= Disconected D/C = 0V Can anyone help with finding why it does not work?

BASCOM-AVR : over range Compare : REPLY

$
0
0
[quote:d7bb2776f8="i.dobson"]And what data types are your variables (word, integer, single, double)?[/quote:d7bb2776f8][quote:d7bb2776f8="nicofer"]The values are between 0 and 4095[/quote:d7bb2776f8]Looks like a 12 bit word, doesn't it? [quote:d7bb2776f8]If you only want to print something when the value changes more than a fixed Delta my idea wont work, But let me think about it.[/quote:d7bb2776f8]There's no reason it won't work, other than clearing single bits requires change of 1+, 2+, 4+, a.s.o. Also it depends, where Lastvalue = value is placed - within or below the conditional block.

BASCOM-AVR : SSD1306 SPI Oled bgf picture display : REPLY

$
0
0
Unfortunately I dont have this display so this is my first dealing with this. But after quick look at the code I`m thinking that it is some kind of software ISP and any pins can be used. So not only hardware ISP and question is do you set those choosen control pins as outputs? Please try it without initiate hardware SPI (if used) and set pins as outputs.
Viewing all 20553 articles
Browse latest View live


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