#avr Logs

Jul 29 2017

#avr Calendar

12:07 AM day is now known as daey
12:18 AM rue_more: so is everyone just writing their own kernel device drivers for all the custom usb tings or , like, what?
01:13 AM day is now known as daey
06:41 AM Gerritjan: Hey all i want to calculate the servo min and max for the adafruit lib how can i do that
06:41 AM LeoNerd: Not sure I follow the question
06:43 AM Gerritjan: well im using the adafruit lib and there is a method setPWM() so i need to set values but i dont know how that works and nothing is standing there i know that the value kan be between 0 and 4095 and the servo is 20us / 50 hz
06:44 AM LeoNerd: Guessing randomly: this is a library for the PCA.. I forget the number
06:44 AM LeoNerd: the 16channel 12bit I²C PWM controller
06:44 AM Gerritjan: yes pca9685
06:44 AM LeoNerd: Also guessing randomly: this is a 1-2msec servo
06:44 AM Gerritjan: mg996r
06:44 AM LeoNerd: You mean 20ms, not 20µs
06:45 AM Gerritjan: yes
06:45 AM LeoNerd: Anyway, the trick with those is you need the period to be 20msec and the duty cycle to vary between 1 and 2msec
06:45 AM Gerritjan: sorry
06:45 AM LeoNerd: So the value needs to be between 1/20 and 2/20
06:45 AM Gerritjan: but how does it go for and backwards?
06:46 AM LeoNerd: Hm?
06:47 AM Gerritjan: 0.14 s/60º (6 V)
06:47 AM LeoNerd: ?
06:48 AM Gerritjan: so if its standing on 80 degree how can i set it to 60 degree again
06:48 AM LeoNerd: You just ask it to be at a given position
06:48 AM LeoNerd: The entire point of a servo is that you ask it *where* to be, and since it knows where it currently is, it works out how to move to get there
06:48 AM LeoNerd: So you don't need to worry about where it is now, just tell it where you want it
06:50 AM Gerritjan: oke so if im dooing it right this is the code? https://pastebin.com/T2LDNgK3
06:53 AM Gerritjan: LeoNerd: right?
06:54 AM LeoNerd: I have no idea
06:54 AM Gerritjan: oke
06:54 AM Gerritjan: hmm thats the problem i need to get the right code because its not working :S
06:55 AM LeoNerd: You want to ensure the thing is on for between 1 and 2msec within the window of 20msec
06:55 AM LeoNerd: How you do that with whatever library you're using I don't know
06:55 AM Gerritjan: im using the adafruit lib
06:55 AM LeoNerd: OK well that doesn't help me as I don't know it
06:55 AM LeoNerd: I know the chip itself
06:56 AM Gerritjan: ow oke :D
11:39 AM renn0xtk9: Folks I am trying to make a usb device with an ATMEG 328 p and V-USB
11:39 AM renn0xtk9: I am using their examples i..e https://pastebin.com/hSdRv0re
11:40 AM renn0xtk9: i don't see anything poping when pluging the device and typing lsusb (in linux)
11:40 AM renn0xtk9: any idea what the reason could be?
11:40 AM LeoNerd: V-USB is terrible
11:40 AM LeoNerd: Best to use a real USB chip like the 32U4
11:44 AM renn0xtk9: LeoNerd I will consider this, but for now I really would like to get it working ^^
11:44 AM LeoNerd: Yeah, it might not
11:44 AM LeoNerd: It's a horrible hack. What it creates isn't true USB
11:45 AM LeoNerd: It;s sometimes good enough for some OSes on some root hubs.
11:45 AM renn0xtk9: moreover I will have to find a non SMD AVR with usb controller
11:45 AM LeoNerd: Sometimes OSes or hubs or ports just don't like it and then there's nothing you can do about it
11:46 AM renn0xtk9: Do you know one with USB controller that is not SMD?
11:46 AM renn0xtk9: as a hobbyist i don't have things to sold SMD
11:46 AM LeoNerd: So get a 32U4 board
11:47 AM LeoNerd: Arduini Micro, or Adafruit's custom one
11:49 AM renn0xtk9: hmm yeah but ideally i would have had the MC standalone to do my real custom stuff
11:49 AM renn0xtk9: I will look at it
11:49 AM LeoNerd: Well, not gonna happen. Get a board with one, or use an SMD chip, or an adapter board
11:49 AM LeoNerd: e.g. a TQFP32 adapter board with a 32U4 mounted on it
11:50 AM LeoNerd: .. or are they 44? I forget
11:51 AM Tom_L: 32
11:51 AM LeoNerd: Hrm. I recalled them having more pins
11:51 AM Tom_L: meh, maybe they do
11:51 AM Tom_L: u2 is 32 i'm pretty sure
11:52 AM LeoNerd: Yeah but the 32U2 is so small it's basically uselesd
11:53 AM Tom_L: it made a good programmer :D
11:53 AM LeoNerd: Hardly any periphs of interest /except/ the USB on those
11:53 AM Tom_L: yeah it was pretty limited
11:57 AM LeoNerd: Ooooh, it does have dualport RAM for USB though
11:58 AM LeoNerd: Hah! No I²C controller either, so you're unlikely to make up for lack of IO pins using an expander
11:59 AM LeoNerd: And no ADC
12:00 PM LeoNerd: Normally a lack of ADC is simple enough to fix with some simple I²C unit, but then... uhmmm
12:06 PM LeoNerd: That said the 32U4 isn't a *lot* better. It has I²C and ADC but its interrupts are all in silly places
12:19 PM renn0xtk9: I am confuse: In the make file I write:
12:19 PM renn0xtk9: FUSE_L = 0xf7 ; FUSE_H = 0xd9; FUSE_EXT= 0xff
12:19 PM renn0xtk9: $(AVRDUDE) -U lfuse:w:$(FUSE_L):m -U hfuse:w:$(FUSE_H):m -U efuse:w:$(FUSE_EXT):m
12:20 PM renn0xtk9: I get as output avrdude: safemode: Fuses OK (H:FF, E:D9, L:F7)
12:20 PM renn0xtk9: did I missunderstood somehting, or is there a confusion between High and Ext fuse in there?
12:43 PM Tom_L: LF HF and EF
12:43 PM Tom_L: but there's generally not much in EF to worry about
12:57 PM renn0xtk9: Tom_L don't understand what you mean ? you mean the order in output is not what is actually printed?
01:15 PM Tom_L: order doesn't matter i think
01:19 PM renn0xtk9: okay thanks
01:19 PM renn0xtk9: seems like now it does pop up in lsusb (changing resistors values. I did not have exactly the same value available as advice on V-USB website ) :p:p:P:p
01:19 PM renn0xtk9: one step forward^^
02:32 PM Tachyon` is now known as Tachaway
02:32 PM LeoNerd: renn0xtk9: Yeah; the trouble you're running into is that without real USB hardware with real level-shifting, you're playing silly hacks like that
03:35 PM xentrac: renn0xtk9: yay! congratulations!
03:38 PM xentrac: LeoNerd: V-USB is noncompliant with the USB spec?
03:43 PM LeoNerd: Verymuch
03:43 PM LeoNerd: Best just to ignore it and get a real USB chip
05:51 PM Dreamer3_ is now known as Dreamer3
06:17 PM atk is now known as k
06:17 PM k is now known as atk
07:42 PM _nexxus__ is now known as _nexxus_
09:41 PM Lambda_Aurigae: pepijndevos, no..i was using a 556 to generate single shot mode or slow pulses....on the clock line..not on the reset line..
11:28 PM rue_shop3: 556? I tiny13 can do that in 40% of the pins
11:32 PM inflex: *hugs* the T13
11:32 PM inflex: love that chip