#avr | Logs for 2014-03-14

Back
[03:34:50] <AllinYourhead> i believe that ive found the source of my problem. The ATmega32C1 got SPI pin select and i've got an external ADC connected on one of the pinouts and my ISP header on the other. SS-pin for ADC-interfaced SPI is shared with MOSI_A from ISP header which could explain why the AVR dragon affects program execution
[04:10:20] <AllinYourhead> since my MCU always is master and ISP overrides pin inits I never initiated that pin. Probably it was then floating and causing the erratic crashes.
[04:10:38] <AllinYourhead> so initiating pin and activating pullup solved it
[05:06:45] <rue_house> ? wow
[05:25:36] <AllinYourhead> idd, kinda glad it didn't take longer to locate such a problem
[08:51:46] <antto> x %= 7; would be slower than if (x >= 7) { x = 0; } ..right?
[08:52:11] <antto> ignoring the case when x is ever outside 0 to 7
[08:52:55] <Thrashbarg> I would think so, yes
[08:53:20] <Thrashbarg> but x &= 7; would be faster, assuming you only ever want numbers from 0-7, or a power of two
[08:53:38] <antto> ehm
[08:54:15] <antto> x&7 != x%7
[08:54:33] <antto> x&7 == x%8
[08:55:05] <Thrashbarg> ah, yes lol... greater than or equal to...
[08:55:18] <Thrashbarg> ignore me it's late here
[08:55:32] <antto> i don't use modulo for powers of two ;]
[08:55:42] <Thrashbarg> yes
[12:59:37] <rue_house> if you have O3 set, gcc will do a fine job of rewriting things like that for you
[12:59:45] <rue_house> its impressed me a few times
[13:00:13] <rue_house> turning long bit flipping macros into bit flipping instructions
[13:03:34] <Casper> and -O3 is also known to cause issues at time
[13:03:43] <Casper> like optimising out delay loops
[13:17:06] <ravon> Not to mention size
[15:52:10] <awozniak_> when running avrdude -U flash:r:filename.hex:ihex ... it doesn't like "ihex". What's the right format specifier to put there?
[15:54:29] <synic> just remove the :ihex
[15:55:00] <synic> oh wait, you're doing something else. nvm
[15:55:30] <awozniak_> I'd like ihex. I also got a "file not found, can't determine format" if I don't put a specifier there.
[15:56:52] <synic> try just :i
[16:43:22] <Tom_itx> also the avrdude pdf will tell you
[16:47:43] <phinxy> ¨/ avr
[18:41:16] <Mattis_> Great lots of people here :D : My putty terminal is outputing wrong letters from USART. I am using 1284p xplained. I feel it has something to do with the baudrate, but i cant figure out the problem. Any tip ? I have been stagnating at this for 2 hours now. :(
[18:41:51] <OndraSter_> Mattis_, we had funky issue at school with UART and putty - the speed was either half or double
[18:41:52] <OndraSter_> in putty
[18:41:55] <OndraSter_> of what yo usaid
[18:41:58] <OndraSter_> you said*
[18:42:51] <Mattis_> shoud i try to double the speed on USART ? OndraSter_
[18:43:08] <OndraSter_> in putty is enough
[18:43:09] <OndraSter_> or halve
[18:43:16] <OndraSter_> I can't remember anymore,it was a year ago
[18:43:27] <Lambda-Aurigae> some 1284p chips have a usart issue.
[18:43:40] <OndraSter_> some weird combination of putty, serial chip (in chipset) and serial whatever
[18:43:51] <OndraSter_> we had avr butterfly
[18:44:00] <OndraSter_> and hardware rs232 port
[18:44:24] <Lambda-Aurigae> Mattis_, is it all the data wrong or just occasionally?
[18:45:47] <Lambda-Aurigae> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=107115&start=0
[18:46:16] <Mattis_> Lambda-Aurigae, Yes all data is wrong, i am trying to change the baudrate and it will change from ▒▒▒▒▒▒▒ggggg ▒▒00▒ when i change the baudrate
[18:46:48] <OndraSter_> you don't have an oscilloscope do you?
[18:47:05] <Mattis_> OndraSter_, , i do
[18:47:48] <OndraSter_> try sending... huh, 0x55 character (don't remember which char it is from top of my head)
[18:47:56] <OndraSter_> and watch it on th escope
[18:48:46] <Mattis_> OndraSter_, alright i will try
[18:56:35] <Mattis_> OndraSter_, just to be shure, flow control: XON/XOFF is right?
[19:00:39] <OndraSter_> Mattis_, that depends :P yes it should be
[19:06:46] <Mattis_> Can i ask what i am looking for at the osc?
[19:12:19] <Mattis_> OndraSter_, I can absolutly see that it is transmitting, i changed from 0x55 to 0x00 and i can se the pattern.
[22:42:10] <Essobi> Sup..
[22:49:00] <Casper> they just removed the snow in the street! yay!
[22:49:09] <Casper> no more narrow streets!
[23:14:23] <DanFrederiksen> midwest usa?
[23:15:11] <Casper> nope and nope
[23:15:18] <Casper> and could also say another nope