#avr | Logs for 2014-03-26

Back
[00:24:01] <clixxIO_> how come you are using putty in Linux?
[00:24:28] <clixxIO_> how long is the data ? could it be handshaking in Linux
[00:25:31] <clixxIO_> what handshaking is being used? RTS/CTS? DTR/DSR? XON/XOFF?
[00:29:00] <clixxIO_> sometimes Windows picks better defaults than linux
[00:35:27] <Casper> clixxIO_: he's gone
[00:35:38] <Casper> hhe was only 3 minutes here
[00:38:07] <clixxIO_> oh well, some people have their limits
[00:40:08] <Casper> yeah
[00:51:09] <clixxIO_> 3-minutes being not a good limit to have according to some people
[03:40:21] <Nicholas`> Hi, does anyone here work with Xilinx ISE? The labs I am going to be working in have version 13.1 however apparently that version doesn't play nicely with windows 8. Will working on a newer version and then opening that project in 13.1 work or must it be the same version?
[03:43:09] <Tom_itx> should work
[03:43:32] <Tom_itx> err maybe not in reverse though...
[04:40:40] <Nicholas`> Tom_itx: only one way to find out! try and break it!
[04:41:50] <Nicholas`> I downloaded and installed (painfully) Xilinx ISE 14.7 on fedora 19 GNOME but unfortunately GNOME doesn't quite seem to like the program and all and so when the program runs, you get this nice large black box on your screen but impossible to be used in any way or form
[05:05:34] <AllinYourhead> I'm looking into reusing some old hardware and I wonder if its possible to connect UART-bus straight to a RS232 interface?
[05:07:07] <AllinYourhead> i have a AT90CAN128 with the UART connected to a MAX232-IC and then solderpads for RS232-side. So do I need to patch my UART lines to the MCU or is it possible to just use the RS232 solderpads?
[05:28:50] <twnqx> AllinYourhead: what's that uart? the max232 will cause the enede levels (12V iirc)
[05:28:57] <twnqx> needed* for rs232
[05:29:29] <twnqx> if you want to connect your PC to it, that's good. if you want to connect some other CMOS level uart to it - don't
[05:30:28] <AllinYourhead> no voltage supply in the line, only GND/TXD/RXD and i intend to connect a FT232 USB-to-UART board to talk to computer
[05:30:40] <AllinYourhead> 5V VCC on the board as well
[05:32:00] <twnqx> then remove the max 232 and connect the FT232 directly to the at90can
[05:34:28] <AllinYourhead> okey, so not possible to go through the max232 even though it's powered by same 5V as MCU?
[05:34:59] <AllinYourhead> or is that circuit able to step up voltage to 12V by itself?
[05:37:23] <Lambda_Aurigae> there are lithium AA batteries now but not sure if they are lithium ion or not.
[05:39:16] <Lambda_Aurigae> AllinYourhead, the ft232 board,,,does it put out rs232 levels or ttl levels on the serial side?
[05:39:53] <Lambda_Aurigae> the ft232 chips put out ttl but on some boards they have added level converters to kick it to rs232 levels.
[05:42:45] <AllinYourhead> Integrated 3.3V level converter for USB I/O .
[05:42:45] <AllinYourhead> • Integrated level converter on UART and CBUS for
[05:42:45] <AllinYourhead> interfacing to 5V - 1.8V Logic.
[05:42:45] <AllinYourhead> • True 5V / 3.3V / 2.8V / 1.8V CMOS drive output
[05:42:45] <AllinYourhead> and TTL input.
[05:43:33] <Lambda_Aurigae> then you should be able to connect that straight to the microcontroller without any level converter chip like the max232.
[05:44:03] <Lambda_Aurigae> in fact, running it through the max232 could damage the ft232 board.
[05:44:32] <Lambda_Aurigae> unless you added another max232 in reverse which would be silly.
[05:45:14] <AllinYourhead> okey, then I'll have to do some soldering in order to make it work. Thanks for the help!
[05:45:37] <Lambda_Aurigae> welcome.
[06:32:09] <AllinYourhead> another issue. Using an ATmega32C1 that has shared UART/LIN interface and it's a pain to find a solid register setting for CLK divisor to a common UART baudrate. Any hints?
[06:32:30] <Lambda_Aurigae> not from me.
[06:32:55] <Lambda_Aurigae> never dealt with LIN.
[06:32:59] <Lambda_Aurigae> and I usually autobaud.
[06:41:34] <AllinYourhead> datasheet says "The UART has an enhanced baud rate
[06:41:34] <AllinYourhead> generator providing a maximum error of 2% whatever the clock frequency and the targeted baud
[06:41:35] <AllinYourhead> rate." How can this be true when baudrate is set by calculation of values with the equation LDIV[11..0] = (FCLK / (LBT[5..0] * BAUD)) - 1
[06:41:47] <AllinYourhead> LBT is samples per bit (default 32)
[06:42:31] <AllinYourhead> 16 MHz FCLK
[06:43:11] <AllinYourhead> and baud trying to be as high as possible without unacceptable precision loss
[08:26:25] <dxtr> are there any avr chips with hardware accelerated encryption (aes 128/256 or something similar), hashing (sha-1/2) and rng? atmega256rfr2 seems to have two of those
[08:44:01] <R0b0t1> Anyone aware of a more detailed schematic of the IO pins than in the documentation?
[08:50:11] <timemage> R0b0t1, what sort of detail are you looking for?
[08:56:23] <R0b0t1> timemage: Transistor level would be best. I'm not sure if that exists.
[08:56:27] <R0b0t1> Trying to troubleshoot device failures.
[09:01:51] <timemage> R0b0t1, i haven't seen anything like that. but also not sure what i'd do with it either.
[09:06:01] <R0b0t1> Yeah pretty much threw up my hands and decided I'd need to contact atmel
[09:06:04] <R0b0t1> they might not have anything
[09:06:54] <myself> R0b0t1: ohh, the pin equivalent schematic?
[09:13:48] <R0b0t1> myself: Yes - there's one in the datasheet, but it is logic level. Looking for implementation of the logical blocks so predict failure modes.
[09:19:45] <timemage> R0b0t1, i'm guessing in general they just tell you to stay within the electrical characteristics and it will last for its MTBF, or whatever.
[09:24:56] <R0b0t1> Yeah. Trying to figure out which conditions could lead to a failure such as this, so I can narrow down when they failed
[09:26:53] <zmo> hi!
[09:41:10] <zmo> I'm trying to use the u8glib library from an AVR bootloader… I successfully shrunk the libarry to fit in < 8k (I'm using an atmega 2560), and it works when flashed as a normal firmware. Though, when I try to flash in bootloader section, the code does not get out of the following loop, which I suspect is because of the pgm_read not working correctly
[09:41:15] <zmo> https://github.com/dlech/ev3dev-glib/blob/master/csrc/u8g_com_api.c#L110
[09:41:39] <zmo> I checked u8g_WriteByte(), and the implemented function *always* returns 1
[09:42:29] <zmo> so in the end, is there any restriction in doing pgm_reads from bootloader?
[09:44:59] <uhsf> I'm starting a keyboard project using one ATMega32U4 breakout board, from SparkFun. I have configured LUFA so when I press a key switch, the letter 'a' is sent to the PC. After giving the avrdude command, the board is recognized as
[09:45:04] <uhsf> a USB HID keyboard. The problem is that whn I press the key switch, no character appears on screen. How to solve this? Can someone here look at my code and tell me whaet I need to change?
[09:47:09] <zmo> uhsf - usually on the atmega32u4, you need to add delay()s between Serial writes, and that applies to USB too
[09:47:22] <zmo> because the USB is handled by the MCU, it can overflow the communication, nad
[09:47:44] <zmo> become unable to communicate
[09:48:24] <zmo> and it's also why it's a good idea to add a few seconds of delay between the time you bring up usb and the time you're using it (at least, before the code gets stable)
[09:49:01] <uhsf> zmo: there is _delay_ms(1000); in the main() of my code
[09:49:41] <zmo> uhsf - well, it's just a general advice, without a code, I can't really help
[09:49:55] <zmo> and sadly, I cannot help you much more, my Internet connection is the worst ever over here
[09:50:09] <zmo> I'm getting up to 18s of ping lag
[09:50:21] <uhsf> zmo: After programming the ATMega32U4 uC with the avrdude command, is it necessary to disconnect and reconnect the USB cable for the device to work correctly?
[09:50:26] <zmo> (I'm currently writing blindly to IRC :-P)
[09:51:00] <zmo> no it is not, the device gets a reset once the new firmware is loaded
[09:52:00] <uhsf> ty, I will ask again later when people with better pings are around
[09:56:33] <antto> where do i get 2 eeprom chips without paying uber penalty shipping price?
[10:03:39] <rooftopjoe> hi. i have an attiny2313-based device that i'd like to communicate some data via USB. do i need a FTDI chip or is it enough to add a connector and use some library?
[10:05:29] <dkordic> rooftopjoe: I think that (solderless) breadboard and FTDI beakout board is the easyest way.
[10:05:40] <bss36504> antto: What parts are you trying to buy? If you're in the US, mouser and digikey will ship UPS/Fedex for about $8. rooftopjoe: You might* be able to use VUSB, but the FTDI chip would be soooo much easier
[10:07:00] <rooftopjoe> i'm not in the US but i'll worry about getting the parts. FTDI would be easier but i'm trying to reduce costs as much as possible :)
[10:07:17] <rooftopjoe> so if it's just easier, i'll probably go the harder way if that saves money :)
[10:07:42] <rooftopjoe> dkordic: for prototyping, maybe
[10:08:05] <bss36504> rooftopjoe: Ok, if you haven't done it before, we're talking like $4 more versus an extremely difficult project (to go with VUSB)
[10:08:45] <rooftopjoe> bss36504: i suspect there are already open libraries to handle the usb-specific details
[10:09:20] <rooftopjoe> i'll do some research and see what i can come up with
[10:09:29] <bss36504> I think a guy managed to put VUSB on a tiny, but it was a hell of a process. The tinies are pretty limited.
[10:09:40] <rooftopjoe> $4 devices multiplied by many units :)
[10:10:20] <rooftopjoe> http://dicks.home.xs4all.nl/avr/usbtiny/
[10:11:12] <bss36504> Go for it then. Seems as though you have found the answer you need
[10:11:13] <rooftopjoe> that "devices" word shouldn't be there
[10:11:21] <rooftopjoe> yep, think so :)
[10:11:58] <bss36504> Why do you need to use a tiny? Why not one of the mega16/32Ux devices?
[10:13:26] <rooftopjoe> bss36504: cheaper
[10:14:01] <twnqx> i hope you realize that there's not much processing headroom left with USB transfers
[10:14:19] <rooftopjoe> during usb transfers i don't need it to do anything else
[10:14:31] <rooftopjoe> and it's not too much data to transfer either
[10:14:39] <twnqx> well, you won't :P
[10:14:40] <rooftopjoe> so lack of processing power shouldn't be much of a problem
[10:14:54] <twnqx> i only once used a tiny so far
[10:14:59] <twnqx> to generate a 50hz square wave
[10:15:32] <rooftopjoe> they seem to go up to 20MHz
[10:15:34] <rooftopjoe> that's pretty good
[10:15:55] <naquad> is there such thing as sleep until ISR?
[10:16:16] <bss36504> naquad: yes, wake on interrupt
[10:16:53] <rooftopjoe> make sure they are enabled, of course :)
[10:17:04] <naquad> bss36504, erm any details on how do i use it? book i've read didn't include power management and advanced stuff :(
[10:17:19] <naquad> also i don't see it here: http://www.nongnu.org/avr-libc/user-manual/group__avr__power.html
[10:17:29] <bss36504> naquad: Read the data sheet for the part you're using.
[10:17:33] <bss36504> what part are you using?
[10:17:37] <naquad> fair enough
[10:17:40] <naquad> 169p
[10:17:42] <naquad> *168p
[10:17:58] <rooftopjoe> i expect it's just one instruction like "halt" or whatever
[10:18:28] <rooftopjoe> dunno how they expose it in C, if that's what you're using
[10:18:47] <naquad> yup, C
[10:18:50] <bss36504> naquad: Chapter 10: Power Management and Sleep Modes
[10:18:57] <bss36504> Chapter 12: Interrupts
[10:18:57] <naquad> yes, i'm there
[10:19:06] <bss36504> Well the info is in there
[10:19:24] <antto> bss36504 i ask exactly because i'm NOT in the US ;]
[10:19:55] <bss36504> antto: Oh well that sucks. 'Merica :P
[10:20:47] <twnqx> just get 65€ of stuff and enjoy free shipping with them!
[10:20:51] <twnqx> if you are in germany.
[10:20:53] <antto> so the rest of the world is in a bad position ;]
[10:20:59] <twnqx> not really
[10:21:12] <twnqx> digikey is among my favourites, 36h delivery time if ordered around midnight
[10:21:31] <antto> if i had what to buy for 65.. i wouldn't be asking ;]
[10:21:36] <twnqx> buy more!
[10:21:45] <twnqx> get a nice selection of atmegas
[10:21:51] <twnqx> you can start to collect avrs!
[10:21:57] <antto> ugh
[10:23:18] <antto> ah, there are such things on ebay actually
[12:53:50] <megal0maniac_afk> twnqx: I collect AVRs!
[12:54:06] <megal0maniac_afk> I can be proud of it here. Everywhere else, though...
[12:57:38] <DanFrederiksen> collect them??
[12:57:55] <DanFrederiksen> not sure you can be proud of that anywhere :)
[12:59:07] <megal0maniac_afk> :p
[12:59:16] <megal0maniac_afk> DanFrederiksen: They've just... accumulated
[13:00:17] <DanFrederiksen> ok
[15:02:24] <naquad> is there external ram support in 168p or 328p?
[15:08:53] <Tom_itx> doubt it
[15:50:00] <dunz0r> You could access external RAM via IO-pins. Like that avr-x86-emulator
[16:03:43] <megal0maniac_afk> naquad: No. You can bitbang anything you like within the limits of the CPU, but the only AVRs with support for external RAM are the ones with an EBI interface iirc. atxmega128a1u is one of those
[16:08:40] <WormFood> [03:27:06] <bss36504> WormFood: One of my classmates just used your baud rate site as a reference for a design. Nice work! <-- The Internet's most popular AVR baud (bit) rate calculator ;) What is funny, is I never promoted that page. I shared the link 2 times in here, and good things travel fast.
[16:09:27] <bss36504> Apparently it is googleable. I didn't tell him about it, I just noticed he was using it. Good job!
[16:22:27] <megal0maniac_afk> bss36504: Yip. It's the first result for "baud rate calculator"
[16:22:49] <megal0maniac_afk> And on the first page for "baud rate"
[19:50:31] <naquad> megal0maniac_afk, ah, i see thank you.
[22:27:45] <Casper> rue_more: ?