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

BASCOM-AVR Old versions : Error - Control 'dxDockErrorPanel' has no parent window : REPLY

$
0
0
Hello albertsm and Evert, reset dock that's is the solution Thank You Best regards toto

BASCOM-AVR Old versions : Problem with 1wire DS1820 : REPLY

$
0
0
after switching off Waitms 10 in this "Tempwandeln" it looks like problem is solved...it is possible? Tempwandeln: 1wreset 1wwrite &HCC 'Befehl "Skip ROM" (auf einzelne Adressierung verzichten) 1wwrite &H44 'Befehl zur Temperaturmessung Ddrb.4 = 1 'DQ-line MUSS spätestens 10µs nach dem Befehl &H44 für mind. 750ms auf High gelegt werden! 'Waitms 10 'jeder 18 S/B 20 zieht jetzt ca. 1,5mA Ddrb.4 = 0 Return

Share your working BASCOM-AVR code here : MD070SD Display : NEWTOPIC

$
0
0
Hello. And another. MD070SD Display with 16 bit parallel bus Interface, Resolution of 800x480, Display Panel with integrated 8-page Video Memory. The control board responds very fast, which can achieve reading and writing cycle up to 200ns and the highest full-screen refreshing speed of 13 Frames. The integrated 8MB SDRAM corresponds to 8-page Display buffer. It is really fast. [url]http://www.youtube.com/watch?v=AptwGRbiyXo[/url]

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

$
0
0
Always nice to see that big parts of [url=http://evertdekker.com/Joomla/index.php?option=com_content&task=view&id=77&Itemid=84]my code[/url] is re-used. Thanks for sharing your code.

Share your working BASCOM-AVR code here : MD070SD Display : REPLY

$
0
0
I found faster way to convert 8-bit color to 16-bit (without Data & Lookup): [code:1:bd7d3ee727]Rgb16 = 0 If Rgb8.0 = 1 Then Rgb16_low = Rgb16_ssd1289_low Or 10 'Blue If Rgb8.1 = 1 Then Rgb16_low = Rgb16_ssd1289_low Or 21 If Rgb8.2 = 1 Then Rgb16 = Rgb16_ssd1289 Or 288 'Green If Rgb8.3 = 1 Then Rgb16 = Rgb16_ssd1289 Or 576 If Rgb8.4 = 1 Then Rgb16 = Rgb16_ssd1289 Or 1152 If Rgb8.5 = 1 Then Rgb16_high = Rgb16_ssd1289_high Or 32 'Red If Rgb8.6 = 1 Then Rgb16_high = Rgb16_ssd1289_high Or 72 If Rgb8.7 = 1 Then Rgb16_high = Rgb16_ssd1289_high Or 144 Return[/code:1:bd7d3ee727] Dim Rgb16 As Word Dim Rgb16_low As Byte At Rgb16 Overlay Dim Rgb16_high As Byte At Rgb16 + 1 Overlay

BASCOM-AVR Old versions : (Need Help) : How to configure DS3231 RTC with AVR8535? : REPLY

$
0
0
[b:6e9201f0a9]"Is the Micro not working, or is there no display or the I2C RTC no communicating"[/b:6e9201f0a9] To Deanus : the micro is working, display OK and I2C OK, but the value is not correct. Please find the attachment for any further detail. On file DS1307.jpg I connect the sda and scl pin (pin C0 and C7) to DS1307, everything is OK, the date and time displayed as i want. But when I change the DS1307 with DS3231 by simply shift the dipswitch and jump it to DS3231 modul attached in breadboard, the display start blinking, and the value goea wrong, as seen on file DS3231.jpg. I connect I2C bus to eeprom and RTC, do I have to config the address of RTC if I want to use RTC?. Idon't think so because on the code I posted before. I did not write a code for addressing RTC, and the RTC running well with no problem. [b:6e9201f0a9]Also check the battery !! do you have pullup RES SDA SCL ?[/b:6e9201f0a9] To Kimmi: yes I do, I have 4,7 K resistor connected with VCC If someone else have try to use DS 3231 RTC with AVR8535 and running well, please give me the code I'm sorry if i'm not so good in english and confusing you :D

BASCOM-AVR Old versions : (Need Help) : How to configure DS3231 RTC with AVR8535? : REPLY

$
0
0
Reading a bit in the Arduino forums the problem is most likely in the Century bit (7) in the Month (&H05) register. Try ignoring this bit; [code:1:3857861972] Sub Getdatetime() I2cstart ' Generate start code I2cwbyte Ds1307w ' send address I2cwbyte 0 ' starting address in 1307 I2cstart ' Generate start code I2cwbyte Ds1307r ' send address I2crbyte _sec , Ack ' Seconds I2crbyte _min , Ack ' Minutes I2crbyte _hour , Ack ' Hours I2crbyte _weekday , Ack ' Day names I2crbyte _day , Ack ' Day of Month I2crbyte _month , Ack ' Month of Year I2crbyte _year , Nack ' Year I2cstop _month = _month And &B01111111 _sec = Makedec(_sec) : _min = Makedec(_min) : _hour = Makedec(_hour) _day = Makedec(_day) : _month = Makedec(_month) : _year = Makedec(_year) End Sub [/code:1:3857861972]

Share your working BASCOM-AVR code here : MD070SD Display : REPLY

$
0
0
Hello Hkipnik, This I will remember as the week of the displays :-) I have seen the amazing demo a week ago and it is impressive how big, brilliant and fast this display is. The touch seems to work very smooth. Thank you for sharing your work and the YT demo. I hope you have a circuit for this board as well. The YT demo shows some kind of interface board for arduino.

BASCOM-8051 : Automatic covertion to ASCII problem : REPLY

$
0
0
aha, you mean you want input validation? in that case you can input a string : input "number?" , sSomeString and then you check all characters in the string to be valid. you could use the mid() function for that. here is some pseudo code: J=len(sSomestring) for a=1 to J krk=mid(sSomestring,a,1) 'get character p=instr("0123456789", krk) 'get pos if p=0 then ' illegal data .... end if next

BASCOM-AVR : 2077 official release : REPLY

$
0
0
Hi After testing it a bit I have one function on my wishlist . A text block select option . Not the complete line but only the chars in a selected block , not the text to the end of a line and from beginning of the next line , this will help a lot to move selected text . K-Edit , crimson editor , and Notepad++ has this function but can not use it with Bascom . Please check the link http://notepad-plus-plus.org/features/column-mode-editing.html Kind regards Nico

BASCOM-AVR : Set EXOR mode : NEWTOPIC

$
0
0
Hi, open it with notepad, glcd.lib the library, so I change the OR to EXOR, and then recompile the library .. ldi r24, & H81 <--- change from 80 to 81 per EXOR mode How can I make directly from BASCOM code? thanks [b:96079e3924][color=red:96079e3924](BASCOM-AVR version : 2.0.7.7 )[/b:96079e3924][/color:96079e3924]

Share your working BASCOM-AVR code here : Control of MCP41HV31 Digital Pot : NEWTOPIC

$
0
0
Hi all, few days ago I needed digital potentiometer for one application. A quick look has returned Microchip's MCP41HV31 Digital Pot. This pot is controlled via SPI, which is nice, because Bascom-AVR can handle SPI with ease. In the program all 4 commands are described: Increment/Decrement (wiper) and Read/Write (wiper position). Program itself is in details described in [url=http://www.svet-el.si/english/index.php/blog]my blog[/url]. Cheers Jure

BASCOM-8051 : Automatic covertion to ASCII problem : REPLY

BASCOM-AVR : Wiznet Link Status : NEWTOPIC

$
0
0
Currently working on several apps and a logfile is created on a SD device for history purposes. In the case where SNTP, WhatIsMyIPpublic, NO-IP updates, etc with no connection was established to the server, it logs these events. In the case of SNTP, there is a serverlist of four servers and each server is attempted 10 times before it goes to the next, circular in nature. No problem there. My current retry rate is 10 seconds. My current Resync rate is 12hrs. If the Ethernet cable is disconnected or a network problem, the software works correctly and logs and reschedules the event. No problem. The problem is that without detecting link status, I am filling my logfile with no connectivity information. I know I could limit this but thought this might be a better approach. If link status is not active, then don't even attempt to connect. Log the event once and when link status comes back, log that event and then allow connectivity functions to occur and log the no connects if server is busy, etc as then the information is valid. Thought this would be simple but looking at the datasheet, LINKLED flashes at TX RX Attempts....grrrrrrr!!! There are already TX RX LEDs...As this routine would be in the main loop it is not that hard to sample the signal for a second or so and report that status if in case it was blinking. If the state is low, then of course you don't have to keep looking for the status as it is indicating a LINK has occurred. Yes there is a question.....A lot of experts up here on this platform. I have looked at the datasheet/registers and don't see a link status bit per say. Is this the only way to monitor the LINKLED output for this? A better way? My development platform is a Aurduino M2560 with a EthernetShield. Added a wire from LINKLED to a port is no problem. Already modified to have the AVR control the reset pulse. Thoughts? TIA, Mark [b:db3e8b3bff][color=red:db3e8b3bff](BASCOM-AVR version : 2.0.7.7 )[/b:db3e8b3bff][/color:db3e8b3bff]

BASCOM-AVR : Wiznet Link Status : REPLY

$
0
0
yes one would think that after w3100, the w5100 would have a register with the status bits. But it took till W5200 before they included it : PHYSTATUS is the Register to indicate W5200 status of PHY. So i don't know a better way for the w5100.

Share your working BASCOM-AVR code here : Control of MCP41HV31 Digital Pot : REPLY

$
0
0
hi Jure thank you for sharing. this is indeed a nice epot. A nice feature is that it keeps its resistance when power is off. That makes it well suited for low power apps. I see it also accepts a relatively high current.

BASCOM-AVR : Set EXOR mode : REPLY

BASCOM-AVR : Inputbin versus Inkey : NEWTOPIC

$
0
0
Hello I have a program on that i use RS485 comunication with "INPUTBIN" and want change to "INKEY", but it's not work For (COM #1) the baud is 38400 Can anyone please show what can be wrong? _start: ################################### "Inkey" way #################################### If Ischarwaiting(#1) <> 0 Then 'look for any received byte Timeout_rx = 0 B_ini = 0 'init flag of communication Pos = 1 'position on the byte array Err_rx = 0 ' Do G_byte = Inkey(#1) If G_byte = 254 And B_ini = 0 Then 'look for the sync byte to initiate the comunication B_ini = 1 'yes, set flag Incr Pos 'sync byte received, increment the position on array Timeout_rx = 0 Elseif G_byte <> 254 And B_ini = 0 Then Err_rx = 1 'error, set flag it's not the init of the comunication Incr Timeout_rx 'and increment the timeout Elseif Pos < 15 And B_ini = 1 Then incoming(pos) = G_byte Incr Pos 'fill the byte array with the received data, it must be 15 bytes Err_rx = 0 'reset the error flag End If Loop Until Timeout_rx = 30 Or Pos >= 15 'Timeout after 30 times error or 15 received bytes ' Temp_nr = Makeint(incoming(6) , incoming(7)) 'recover the temp_nr (word) 'if not comment the next print it's work!!!!!!!!!!!!!! 'Print #2 , Temp_nr ; " " ; incoming(11) ; " " ; Timeout_rx ; " " ; Pos ; " " ; Err_rx ; " " ; incoming(2) ' If Err_rx = 0 Then 'if no errors Temp_nr = Makeint(incoming(6) , incoming(7)) 'recover the temp_nr (word) If incoming(11) = 125 And Temp_nr = nr Then 'test the received data if it can be correct Orig = incoming(2) Rx_cmd = incoming(3) Crypt = incoming( 8 ) Timeout_rx = 0 B_ini = 0 Err_rx = 0 Else Print #2 , "Failled" Goto _start End If End If ######################################################################################## ########### Inputbin way - This works but want to change instead "Inputbin" to "Inkey" ############################# If Ischarwaiting(#1) <> 0 Then 'loock for the sync byte to iniate the comunication Inputbin #1 , Serialchar 'get the byte If Serialchar <> Master Then Goto _start 'check if it the sync byte Inputbin #1 , Orig , Rx_cmd , Quant_bytes , Rx_end , Temp_nr , Crypt , Word_dbg , R_done , Rx_data(1) , Quant_bytes 'collect the data If Temp_nr <> nr Or R_done <> 125 Then R_done = 0 : Rx_data(1) = 0 Clear Serialin Goto _start End If ######################################################################################## Best regards toto [b:71415e5a11][color=red:71415e5a11](BASCOM-AVR version : 2.0.7.7 , Latest : 2.0.7.7 )[/b:71415e5a11][/color:71415e5a11]

Share your working BASCOM-AVR code here : MD070SD Display : REPLY

$
0
0
about the 8 bit. How do you process the 24/16 bit to 8 bit pallet? And the RLE decompression. I see after &HAA the bytecount is read. But the case where &HAA is a color is not handled. Does this mean that you change such a color? So AA is exclusive for the RLE? That is a good idea. I ask because i work a 65K oled driver and i see how good the images looks on the demos and i did not realize these were 8 bit pallets.

BASCOM-AVR : Inputbin versus Inkey : REPLY

$
0
0
Hi, Maybe you need to use ischarwaiting to see if a character is waiting before you call inkey. Regards Ian Dobson
Viewing all 20717 articles
Browse latest View live


Latest Images

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