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

BASCOM-AVR : KS0108 Display: Trouble with higher clock speed : REPLY

$
0
0
Good morning (evening) gentlemen, O-family here are the pictures you asked 1ste 3 pictures are not booting last 2 pictures are booting while I slowly increase voltage ( the slanting line :-) ) I hope this helps you Wilfred

BASCOM-AVR : KS0108 Display: Trouble with higher clock speed : REPLY

$
0
0
hmmm can only post 3 pictures at once here are the last 2 these are when the system starts ok

BASCOM-AVR : KS0108 Display: Trouble with higher clock speed : REPLY

$
0
0
The E line in picture 1 and 2 looks not that nice, high is 2.5V and low is 0.8V. Measure on the avr the E line with the wire to the display lose to see if it's better then.

BASCOM-AVR : Diy serial LCD : REPLY

$
0
0
Hi, I buy a seriallcd in ebay but I am a hobby electronic and want to build my own serialdisplay . Thanks Hans

BASCOM-AVR : KS0108 Display: Trouble with higher clock speed : REPLY

$
0
0
Wow Evert my channel 1 of the o-scope is damaged! First i thought it was the signal but then I switched channels and the signal was 0 - 5V so it is the scope! the signals are ok ...will try again tomorrow :(

BASCOM-AVR : KS0108 Display: Trouble with higher clock speed : REPLY

$
0
0
If it's your scope broken and image 1&2 are oke then image 5 is not oke, because both channels are here 5V.

BASCOM-AVR : KS0108 Display: Trouble with higher clock speed : REPLY

$
0
0
O-family it seems that my scope has something wrong with it ( all the S*** happens at the same time :-( ) this picture is DB7 =blue and E in Yellow the amplitudes are both 5 V this is while not booting .

BASCOM-AVR : KS0108 Display: Trouble with higher clock speed : REPLY

$
0
0
A probe is damaged? So why the waveform of the /RST signal, whether the 5V both? As for me, E clock seemed to short-circuit with other signal lines. I want to see a longer time, the waveform of the /RST pin of [Check 1]. (until it can check a LCD /RST signal) O-Family

BASCOM-AVR : GETADC(9) on mega32u4 : NEWTOPIC

$
0
0
Hi, i just try to get a reading from channel #9. This is the code: Config Adc = Single , Prescaler = Auto , Reference = Internal_2.56 Start Adc ... Adc_in = Getadc(9) ... Result is always 512. Portd.6=input (ADC channel #9), PullUp = off I also failed to read from the Temp. Sensor. ... Adcsrb.5 = 1 'channel 8..15 Admux.2 = 1 Admux.1 = 1 Admux.0 = 1 '3 Bit for Temp-Sensor Adcsra.3 = 0 'No interrupt Adcsra.5 = 0 'Auto trigger off Adcsra.7 = 1 'ADC on Adcsra.6 = 1 'Start Waitus 10 Adcsra.6 = 1 'Start second conversion Waitus 10 Adc_in = Adcd 'Read result ... Any suggestions? Thanks in advance Peter [b][color=red](BASCOM-AVR version : 2.0.7.6 )[/b][/color]

BASCOM-AVR : GETADC(9) on mega32u4 : REPLY

$
0
0
[quote:4c6fd83a3c="pgill"]Adc_in = Getadc(9)[/quote:4c6fd83a3c] That selects differential input ADC1<>ADC0 wit a gain of 10x. You need to read a) the datasheet and b) the help about GetADC().

BASCOM-AVR : GETADC(9) on mega32u4 : REPLY

$
0
0
Thanks MWS, i was asking for help because i couldnt find any in both: the datasheet and the helpfile. So if you know what to do - please tell me. Thanks Peter

BASCOM-AVR : GETADC(9) on mega32u4 : REPLY

$
0
0
[quote:8a509126eb="pgill"]...because i couldnt find any in both: the datasheet and the helpfile.[/quote:8a509126eb] The helpfile called by F1 differs slightly from the Bascavr.pdf in Bascom's pdf-folder within Bascom's home-directory. I prefer the pdf, as I feel it's easier to look things up. But both sources quote: [quote:8a509126eb]The ADCSRB register contains a bit named MUX5 that must be set when a channel higher then 7 is used. The compiler (lib routine) will handle this automatic. This is true for new chips like Mega1280, Mega2560 and probably other new chips with 100 pins.[/quote:8a509126eb] In the ATMega32U4 datasheet it's under Analog to Digital Converter --> ADC Register Description. That means, if the ATMegaU4 doesn't belong to above mentioned chips, you can't address single ended channel 9 with GetADC(9), instead you have to set MUX5. Normally it can be done this way, also from the help: [code:1:8a509126eb]W = Getadc(1, 32)[/code:1:8a509126eb] If that won't work for you, try this: [code:1:8a509126eb]ADCSRB.MUX5 = 1 W = GetADC(1)[/code:1:8a509126eb] You also have the option to try it out in the simulator and look up the registers ADMUX and ADCSRB, then you'll see what happens. I use also AVR-Studio for that purpose.

BASCOM-AVR : GETADC(9) on mega32u4 : REPLY

$
0
0
In 2077 the DAT files contain the required info to handle the mux5 bit when getadc(channel) is used. But you do need to pass the proper channel. For example for the 1.1V bandgap it would would be &011110. Just use the value from the datasheet for the MUX. For 2076 follow MWS advise.

BASCOM-AVR : Diy serial LCD : REPLY

$
0
0
it is a simple task. especially when using the UART. - first of all , make your M8 slave controlling the LCD. - then you need to have some protocol to control the LCD. For example to clear the screen with CLS you need to send some character that you would not use. - use buffered serial input with some buffer in order not to loose data or use some handshake. simple sample: [code:1:16bb64fcfa]dim b as byte do b=waitkey() 'wait till master send data select case b case 2 : CLS ' master send chr(2) to clear screen case 3 : HOME ' master send chr(3) for home case else 'normal data lcd (chr(b)) 'just send data end select 'if you want a handshake you could send some confirmation back like : print "#" ; loop [/code:1:16bb64fcfa] you could also use SPI (see spi slave) or TWI.

BASCOM-AVR : AtTiny85 as I2C slave : REPLY

$
0
0
The i2cslave package is updated with xmega and USI. It will be released together with 2077. When you write to support you can test it. But you need 2077 installed in order to test it.

BASCOM-AVR : simple spi soft problem : REPLY

$
0
0
The help contains a lot of info about SPI. But what most people do not get is that SPI works with a master and slave. Only the master can initiate transactions. And the slave can only respond to the master. This means that you can only tell a slave what to do. When you want to read data from a slave, you first need to inform the slave that you want to retrieve data. So you need some protocol. But let us go one step back : the master and slave form a 16 bit shift register. this means that when you shift/send out a value from the master, you read back the value that was in the slave. So if you want to make a slave that will increase a byte value that it receives by 1, and send that back you would do this : Master : send byte with value of 100 Slave : contains a value for example 0 and will send this back to the master. Master : receives the value 0 from the slave. Slave : now has receives the value from the master with value 100. So now slave can increase this value with 1 so it becomes 101. Master : need to send a dummy value of say 0 so it will get back the value from the slave. Slave : send back 101 to master. Master now has value 101. To test things use the sendspi.bas sample from the samplesSPI and spi-slave.bas from samplesSPI. Do take care not to use STK200. it has some internal connections that does make it fail. When it works using the SPI hardware you could make a next step to using the soft version.

BASCOM-AVR : Question to i2c_TWI-slave-acknack.LBX/i2c_TWI-slave.LBX : REPLY

$
0
0
TWI_BTW and TWI_BTR are reset to 0 when the slave is addressed. They are increased by 1 for each byte to send/receive. The base is always 1.

BASCOM-AVR : GETADC(9) on mega32u4 : REPLY

$
0
0
Thanks for the answers! I tried both ways, but no result. I also set the registers manual - same way as reading the temp. sensor in my first posting, only for single ended input ADC 9: No result. It seems that i cant read from the ADC with or without GetAdc(). Did i forget anything in the configuration?

BASCOM-AVR : Avr doesn't start (boot) : REPLY

$
0
0
You have a rather surprising problem. Does the micro have a 0.1 uF By-Pass cap across the Vcc and Ground, and AVcc and Ground pins, as close to the micro as possible? Did you try, as suggested above, running on the internal RC Osc to see if the problem improved, (indicating an external Xtal and / or cap problem)? Did you ENABLE the Brown out detector fuse? If you are not familiar with what it does, ask. If you are familiar with it, then we won't spend time discussing it. Depending upon your specific external Xtal, and the capacitance of your traces on your PCB, the 18 pf caps could be too high, (although note that Evert suggested making them even larger, above). (So you have three choices: Leave them alone, make them bigger, make them smaller...) Powering up the peripherals before you power up the micro is NOT a good idea. The data sheet specifically states the allowable voltage on the I/O pins in the Electrical Characteristics section of the data sheet. Bottom line: Having +5 V on a data line from a peripheral, (e.g. the LCD), to the micro, before the micro is powered up, is out of spec. It is usually best to power them up together. Have you put a digital storage scope on the V+ rail while powering up the circuit? Does the power supply have enough power capability to properly power the circuit? Atmel AVRs have an internal Power On Reset circuit. Specific criteria must be met, or the POR circuit won't enable the micro to start running. The voltage must be mono-tonic, (smooth, rising, no dips or glitches). The rate of rise is also important, not too slow, not too fast. In the old days, with large transformers, it was common to have several 1000 uF's on the INPUT to a 7805. These days you have to be careful NOT to put too large a cap on the INput, or the power supply can't turn on fast enough. As stated above, already, look at the data sheet for the specific 7805 you have, by specific manufacturer, and make sure you have the input and output caps in spec. Check, as mentioned above, the current being drawn by the LCD's backlight. Make sure it is in spec, or reduce it while debugging your circuit. JC

BASCOM-AVR : Avr doesn't start (boot) : REPLY

$
0
0
[quote:88b091e314]Atmel AVRs have an internal Power On Reset circuit. Specific criteria must be met, or the POR circuit won't enable the micro to start running. The voltage must be mono-tonic, (smooth, rising, no dips or glitches). The rate of rise is also important, not too slow, not too fast. [/quote:88b091e314] I deliberately tried many times to make an AVR ( several different models ) not start by doiing terrible things to the power supply. Never ever had one fail to start when the voltage finally came within spec. That was one of my original criteria for choosing AVR over several other processors. Means you dont need another voltage supervisor circuit to get it to start reliably. I see nothing in the datasheet to suggest the AVR needs a critical rate of rise of power supply to make a reset, only the level has to meet certain criteria.
Viewing all 20625 articles
Browse latest View live


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