#avr Logs

Nov 04 2018

#avr Calendar

12:53 AM day__ is now known as day
04:44 AM eszett_: hi..
04:53 AM circuit is now known as elektrinis
07:16 AM vmt: --
08:15 AM Miyu is now known as hackkitten
09:30 AM Maya-sama is now known as Miyu
10:35 AM rue_mohr: hi
10:35 AM rue_mohr: what up
10:35 AM rue_mohr: yes, you can use the adc as a timer
10:35 AM rue_mohr: next question
11:18 AM [1]MrMobius is now known as MrMobius
11:30 AM kakimir: hello
11:33 AM kakimir: ADC mux
11:33 AM kakimir: is there any delay to be concerned about?
11:33 AM kakimir: in ADC channels or BOD
11:33 AM kakimir: I noticed that if I did some fast averaging sampling for BOD my measurements were off by quite a lot
11:33 AM kakimir: changed from averaging adc read to single conversion and readings were much more realistic
11:33 AM kakimir: in case of BOD
11:54 AM rue_mohr: no
11:55 AM rue_mohr: it takes about 14 adc cycles to do a conversion
11:55 AM rue_mohr: maybe you ahve the adc clock too high
12:07 PM kakimir: certainly I check if conversion is complete
12:11 PM rue_mohr: if the adc clock is too fast, the results will all be messed up
12:32 PM kakimir: lemme see
12:33 PM kakimir: 1Mhz clock and divider is 16
12:34 PM kakimir: I need to check that 1Mhz tommorow
12:34 PM kakimir: attiny20 should be shipped with 20mhz
12:34 PM kakimir: 1Mhz*
12:50 PM kakimir: hmm maybe found the bug
12:50 PM kakimir: will see tommorow when I get back to my desktop
01:03 PM kakimir: if I run out of mem with attiny20 is there any nice upgrade chip that would feature more mem and small pkg?
01:22 PM rue_shop5: stm32
01:22 PM rue_shop5: F103
01:22 PM rue_shop5: :)
01:22 PM kakimir: stm8?
01:22 PM rue_shop5: no, blue pull stm32 $3
01:23 PM kakimir: I cannot just quadruple price of electronics
01:23 PM rue_shop5: https://www.aliexpress.com/item/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-Forarduino/32342717171.html
01:24 PM rue_shop5: no, that'll make it lower
01:24 PM rue_shop5: is the tiny20 a 18 pin chip?
01:25 PM rue_shop5: its got 2k?
01:25 PM rue_shop5: dont make a tiny40, hmm
01:25 PM rue_shop5: use digikey to search
01:25 PM kakimir: mmh package currently
01:26 PM rue_shop5: did you open that link?
01:26 PM rue_shop5: or did you think it was not for you?
01:26 PM rue_shop5: or just didn't see it?
01:26 PM rue_shop5: https://www.aliexpress.com/item/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-Forarduino/32342717171.html
01:26 PM rue_shop5: https://www.aliexpress.com/item/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-Forarduino/32342717171.html
01:26 PM rue_shop5: https://www.aliexpress.com/item/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-Forarduino/32342717171.html
01:26 PM rue_shop5: https://www.aliexpress.com/item/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-Forarduino/32342717171.html
01:26 PM rue_shop5: just to make sure, sometimes people miss the links I post
01:27 PM rue_shop5: even from china the tiny20 are 1.40ea
01:27 PM rue_shop5: huh 1.45
01:28 PM rue_shop5: I wonder if there is much difference to the tiny24a
01:28 PM kakimir: 5V operation is needed
01:28 PM rue_shop5: that carrier board is run with 5V
01:28 PM rue_shop5: and you can give it 5V inputs
01:28 PM rue_shop5: iirc
01:28 PM kakimir: I need chip that runs directly from 5v
01:29 PM rue_shop5: mhm
01:29 PM kakimir: also stm32 has poorly smaller packages
01:29 PM rue_shop5: what you need to do is spend more money
01:29 PM rue_shop5: the attiny24a is cheaper
01:29 PM rue_shop5: I think its also 2k
01:29 PM rue_shop5: what are you trying to get it to do?
01:30 PM rue_shop5: the 24A prolly has better hardware systems in it
01:31 PM rue_shop5: but, it upgrades to the tiny44
01:31 PM rue_shop5: (a)
01:31 PM rue_shop5: 4k
01:31 PM rue_shop5: iirc there is a 324 also
01:31 PM kakimir: 4K certainly is enough
01:31 PM rue_shop5: oh, ther eis a tiny40
01:31 PM rue_shop5: that'll be 4k
01:32 PM rue_shop5: you starting to see how these model numbers work?
01:32 PM rue_shop5: a tiny80 would be 8k
01:32 PM rue_shop5: 320 would be 32k
01:32 PM rue_shop5: 10240 would be 1024k
01:32 PM kakimir: yes
01:33 PM rue_shop5: 10485800 would be 1048580k
01:33 PM kakimir: these things have 32 registers wow
01:33 PM kakimir: I thought it was just handful
01:33 PM kakimir: like 8
01:33 PM rue_shop5: oh dear god, your programming them in assembler?!
01:34 PM kakimir: no
01:34 PM rue_shop5: there isn't much that should ever have a person have to resort to assembler
01:34 PM rue_shop5: anymore
01:34 PM rue_shop5: as long as your not trying to use c++ or java you should be fine
01:35 PM kakimir: C is only thing I'm able to do
01:36 PM kakimir: I'm very niche
01:54 PM rue_shop5: C is all you need
01:55 PM rue_shop5: all the other languages were only meant for academic applications
02:35 PM kakimir: and fooling around
03:14 PM kakimir: rue_shop5: I don't know where you pulled the prices for chips. attiny20 and attiny44 look like subeuro for me
03:15 PM kakimir: attiny44 is 0.6eur @ 1k
03:16 PM kakimir: and attiny20 is under 0.5eur @ 1k
03:25 PM rue_mohr: tiny24
04:01 PM wondiws: I was just playing lemmings, and quit it when "lemmings has quit" :P
05:18 PM wondiws: I don't quite get this baud rate table: https://cache.amobbs.com/bbs_upload782111/files_22/ourdev_508497.html
05:19 PM wondiws: for 3.6864MHz, 115,200 baud needs a UBRR value of 1
05:19 PM rue_mohr: thats right
05:19 PM wondiws: but with 7.3728, which is exactly double the clock speed, UBRR = 3
05:19 PM rue_mohr: tahts the old table
05:20 PM wondiws: shouldn't that be 2 then?
05:20 PM rue_mohr: its too bad I dont ahve the backup of his new one
05:20 PM rue_mohr: tat the old table
05:20 PM rue_mohr: they took the headers off
05:21 PM wondiws: rue_mohr, how does the AVR work internally then with the UBRR register?
05:24 PM rue_mohr: the ubbr is a divider
05:25 PM rue_mohr: which avr are you using?
05:26 PM rue_mohr: why is it taking so long for you to answer?
05:26 PM rue_mohr: ok bye
05:27 PM wondiws: rue_mohr, are you impatient? I was browsing on the internet while waiting for you to answer?
05:27 PM wondiws: I'm using the atmega8
05:33 PM rue_mohr: http://ruemohr.org/~ircjunk/avr/mega8/usart.c
05:34 PM rue_mohr: http://ruemohr.org/~ircjunk/avr/mega8/usart.h
05:34 PM rue_mohr: USART_Init( 51 ); // or whatever your divisor is
05:34 PM rue_mohr: USART_printstring("Hello");
05:38 PM rue_mohr: http://ruemohr.org/~ircjunk/avr/baudcalc/avrbaudcalc-1.0.8.php
05:38 PM -!- #avr mode set to +o by ChanServ
05:39 PM rue_mohr changed topic of #avr to: Emil hates Rue and will be promoting his own channel, #avrs | http://www.engbedded.com/fusecalc/ | http://ruemohr.org/~ircjunk/avr/baudcalc/avrbaudcalc-1.0.8.php
05:39 PM -!- #avr mode set to -o by rue_mohr
05:49 PM wondiws: rue_mohr, I completely don't get the 7.3728 table in your page, 115,200 = 3, 230,400 = 1 :S
05:49 PM rue_mohr: there is a flag that changes the meaning of the divisor
05:50 PM wondiws: what, the U2X?
05:50 PM rue_mohr: sounds like it
05:50 PM wondiws: rue_mohr, but the table doesn't mention whether or not it is set, so I expect it to be not set...
05:51 PM rue_mohr: if you look at the comments on the bottom of the link I provided it expalins the difference
05:51 PM rue_mohr: oh and did you get the two source files I posted you?
05:51 PM rue_mohr: and see the two lines of code?
06:01 PM wondiws: rue_mohr, my problem is probably the battery power
06:28 PM rue_shop5: yea, NEVER develop avr under battery power
06:28 PM rue_shop5: but usually do not try to do 115200 baud
06:28 PM rue_shop5: I can just about certianly say YOU DO NOT NEED THAT MUCH SPEED
06:29 PM rue_shop5: just like c++, your going for it cause its the biggest number
06:29 PM rue_shop5: 4800 and 9600 baud are stable speeds for just about any device
06:30 PM wondiws: rue_shop5, what do you mean, never develop under battery power? Can't I use an AVR with a battery? :S
06:30 PM rue_shop5: use it with a battery, sure
06:30 PM rue_shop5: but when you WRITING the software and working out your bugs, do NOT use battery power
06:31 PM wondiws: rue_shop5, I'm having difficulty doing an analog read
06:31 PM wondiws: rue_shop5, I want to use that as seed for rng
06:31 PM rue_shop5: ok, first power it with anything but battery power
06:34 PM rue_shop5: developing with battery power is one of the oldest mistakes in the book
06:34 PM cehteh: what do you use as source on the analog input?
06:34 PM rue_shop5: I'm guessing transistor white noise
06:34 PM wondiws: cehteh, I try now a simple joystick
06:34 PM wondiws: just to test this
06:35 PM cehteh: how do you connect it?
06:35 PM wondiws: cehteh, like I always do
06:35 PM cehteh: perfect
06:36 PM wondiws: cehteh, no, I must be overlooking something in my code
07:00 PM rue_mohr: you didn't try the serial code I gave ya, did you?
07:00 PM rue_mohr: whats your clock freq?
07:00 PM rue_mohr: and is it the adc or the serial your having isues with
07:00 PM * rue_mohr tries to stay awake
11:44 PM davor_ is now known as davor
11:52 PM day__ is now known as day