#avr | Logs for 2015-12-10

Back
[09:16:07] <Aleks> weird, I'm setting up Timer3 on mega2560 with Frequency and Phase correct PWM, and at the start I want the output of the OC3A, OC3B pins to be low, so I set the coresponding OCR3A and OCR3B to 0 and start the timer. But at the very same moment that I turn on the timer (I'm using a 1/8 prescaler & ICR3 as TOP) there is a brief pulse on OC3A and OC3B. Any ide why that might be ?
[09:36:05] <Aleks> If I first set ICR3 to 0, then start the timer -> TCCR3B |= (1 << CS31); and afterwards set ICR3 to the desired value (1000) the pulse at startup is gone
[09:39:49] <Aleks> the pulse was exactly 1ms (as the period) long
[09:40:16] <Aleks> maybe at startup it doesn't update the OCR3A and OCR3B immediately
[09:56:26] <Fleck> do you reset TCNT3 ?
[10:11:56] <Flutterbat> you get similar pulses if you set the DDRX before you configure the PORTX. I dont remember exactly under which circumstances it happened, but swapping to first PORTX then DDRX solved the issue
[14:29:26] <kasper> hi everyone
[14:29:55] <kasper> I have a problem which I hope someone here can help me with
[14:31:17] <kasper> I'm trying to flash an ExplainedPro mini board with an ATMEGA328P chip, using Eclipse and AVR plugin, but Eclipse tells me that the MCU is not supported by AVRdude ??
[14:31:38] <kasper> Do anyone know of a solution to this issue?
[14:32:07] <Fleck> heh
[14:33:00] <Jartza> wut
[14:33:16] <Jartza> no idea about eclipse avr-plugin, but check your avrdude?
[14:33:28] <kasper> the version is 6.0.1
[14:33:34] <kasper> the latest, apparently
[14:33:38] <Jartza> avrdude -c stk500 -p foo
[14:33:48] <Jartza> if it lists atmega328p, then it should be supported
[14:34:15] <Jartza> should be m328p
[14:35:16] <kasper> yes I see
[14:35:25] <kasper> but eclipse tells me differently
[14:35:48] <kasper> any suggestions?
[14:36:14] <Fleck> yep - don't use eclipse :D
[14:36:31] <kasper> well, what else then, if I'm on linux :)
[14:38:53] <Fleck> avr-gcc? :)
[14:42:28] <kasper> yes
[14:44:03] <kasper> but will there be issues with the programmer? I'm fairly new to this...
[14:44:59] <Fleck> avrdude :)
[14:45:07] <kasper> I don't use a separate programmer, I use, or try to use, the onboard stuff
[14:45:25] <kasper> can you tell me the command? :)
[14:46:55] <Fleck> avrdude is the command
[14:47:47] <kasper> yes, but there must be more?
[14:48:08] <kasper> device, chip type and so on?
[14:49:42] <Fleck> hmm
[14:49:56] <kasper> I have to specify a programmer
[14:50:12] <Fleck> kasper: tried avrdude --help
[14:50:14] <Fleck> ?
[14:50:18] <kasper> I typed avrdude -p m328p
[14:50:55] <Fleck> -c <programmer> Specify programmer type.
[14:51:00] <Fleck> -p <partno> Required. Specify AVR device.
[14:51:55] <kasper> yes, but another problem is that I don't know which programmer to choose, it shows up as meDBG
[14:52:01] <kasper> and it's not supported
[14:52:06] <kasper> apparently
[14:52:19] <Fleck> USB?
[14:52:26] <Fleck> what board do you have?
[14:52:29] <Fleck> chip...
[14:52:35] <Jartza> ahh, xplained pro mini?
[14:52:49] <kasper> yes
[14:52:51] <Fleck> promini is usb2ttl
[14:52:55] <Fleck> serial port
[14:53:05] <kasper> thanks! I'll try!
[14:53:47] <Fleck> wrong, sorry
[14:53:59] <kasper> it says Can't find programmer id "usb2ttl"
[14:54:16] <Fleck> promini doesn't have usb2ttl
[14:54:25] <Fleck> usb2ttl is not ID of a programmer
[14:54:48] <kasper> I read somewhere that baudrate is 56700
[14:54:52] <kasper> but not sure
[14:55:07] <Fleck> do you have only promini? no other usb dongles?
[14:55:45] <kasper> I have an STK200
[14:55:47] <Jartza> kasper: yes, that mDBG is not really avrdude compatible as-is
[14:56:01] <Jartza> you need to burn bootloader to the chip first IIRC
[14:56:05] <kasper> but that will be of little help, I think
[14:56:42] <kasper> so I can't flash it as-is?
[14:58:24] <kasper> I have an arduino
[14:58:48] <Jartza> kasper: you can, with atmel studio :P
[14:58:52] <Fleck> http://www.avrfreaks.net/forum/parallel-programmer-and-avrdude
[14:59:20] <kasper> yes, when will atmel make a linux version :))
[15:01:29] <Jartza> unfortunately avrdude doesn't support the mEDBG directly
[15:01:41] <Jartza> with atmel studio it works nicely
[15:01:43] <Fleck> I have USBASP, never had any problems! :)
[15:01:51] <Fleck> on linux...
[15:02:05] <kasper> I actually have one of those somewhere
[15:02:51] <Jartza> but if I understood correctly, optiboot supports xplained board too
[15:03:47] <kasper> what is optiboot?
[15:04:20] <kasper> I have an atmel-ICE debugger, does that flash as well?
[15:04:28] <kasper> yes!
[15:04:35] <kasper> it says on the box!
[15:09:59] <kasper> all right, I need to solder ISP connectors on the explained, so it will have to wait until tomorrow
[15:10:19] <kasper> thanks for the help, Jartza!
[15:41:08] <ferdna> just a crazy idea i had...
[15:41:32] <ferdna> is it possible... to make a usb sd card reader?
[15:41:47] <ferdna> or is it bluetooth too slow for that?
[15:42:24] <cehteh> .. now think, ask again please :D
[15:42:39] <cehteh> you mean BT sd card reader? what?
[15:42:46] <ferdna> yes
[15:42:58] <cehteh> and what is 'slow' ...
[15:42:59] <ferdna> being able to connect to a usb card using bluetooth
[15:43:10] <ferdna> the file transfers/reading/writing
[15:43:11] <cehteh> sd card you mean?
[15:43:38] <cehteh> could work
[15:43:47] <cehteh> but of course it wont be extremely fast
[15:44:55] <cehteh> and you need to go some lengths RTFM about bluetooth specs, there are filetransfers but iirc there is nothing comparable to a usb 'storage device'
[15:45:51] <cehteh> maybe you can tunnel usb through bluetooth .. at least on linux that should be possible
[15:46:04] <cehteh> but overall it will be some pain
[15:48:53] <cehteh> https://de.wikipedia.org/wiki/Bluetooth-Profile .. just check that
[15:50:54] <ferdna> cehteh, problem is my phone doesnt have an sd card reader built into it
[15:51:06] <ferdna> so i thought of doing something about it
[15:51:42] <cehteh> would be much more complicated than its worth
[15:52:04] <ferdna> i see
[15:52:08] <cehteh> store stuff on the cloud .. git annex ftw
[15:52:30] <ferdna> cool
[16:25:20] <jacekowski> cehteh: nothing you can't hack with fuse
[16:26:01] <jacekowski> cehteh: you could use bluetooth networking and make that card reader appear as NFS/CIFS share
[16:26:09] <cehteh> yes
[16:27:08] <cehteh> just DUN and some small dav server should work too .. but still there isnt that much gain, rather lots programming for little benefit
[21:47:11] <rue_house> #define IsHigh(BIT, PORT) (PORT & (1<<BIT)) != 0
[21:47:11] <rue_house> #define IsLow(BIT, PORT) (PORT & (1<<BIT)) == 0