#avr | Logs for 2016-07-22

Back
[04:09:08] <noppelmax_> Hey, what header file contains TCCR0 ? (Timer0 Registers)
[04:09:43] <noppelmax_> I tried io.h and interrupt.h
[04:24:06] <DKordic> noppelmax_: And what is in io.h!?
[04:40:03] <noppelmax_> For example PORTB, DDRB, ...
[05:45:19] <Lambda_Aurigae> noppelmax_, io.h loads another .h file depending on your mmcu setting..that is where what you are looking for is located.
[06:18:31] <noppelmax_> Lambda_Aurigae, thanks ill take a look at it when im at home
[06:28:19] <Lambda_Aurigae> the files are in /usr/lib/avr/include/avr
[06:28:22] <Lambda_Aurigae> at least, on linux.
[06:28:30] <Lambda_Aurigae> dunno where the hell winblows puts stuff.
[06:50:18] <noppelmax_> Im on linux. ;) Thanks
[06:51:59] <noppelmax_> At home...
[07:32:56] <carabia> Install Dir > Studio > 7.0 > toolchain > avr8 > avr8-gnu-toolchain > avr > include
[07:33:02] <carabia> 8)
[08:36:45] <LeoNerd> so.. I do believe I have a working 328PB breakout board
[08:36:49] <LeoNerd> <.< Who wants one? :)
[08:38:22] <LeoNerd> ... Well don't all jump at once; I've only got 3 currently ;)
[08:38:32] <twnqx> lol
[08:38:47] <twnqx> is there a super-simple PIC programmer?
[08:39:12] <twnqx> prefarable so easy i could build it for one-time use ona breadboard
[08:50:36] <LeoNerd> If I wanted to one-shot program a PIC I'd likely use my bus pirate
[08:51:59] <theBear> if you got olden-days ports on a working machine ponyprog from memory has a fairly minimalistic one
[08:52:35] <twnqx> well
[08:52:39] <twnqx> the pic i want to program
[08:52:42] <twnqx> IS my bus pirate
[08:52:56] <LeoNerd> Ah...
[08:53:00] <LeoNerd> #awkward
[08:53:02] <twnqx> :D
[08:53:13] <LeoNerd> Want to borrow a second one? ;)
[08:53:24] <twnqx> i actually sold my second one to eszett >_>
[08:53:29] <LeoNerd> Ohoh.. I do have a simple AVR program I wrote that -mostly- emulates the BBIO parts of a bus pirate
[08:53:50] <LeoNerd> You can burn that onto a mega328 and then it mostly behaves like a binary-only buspirate, at least for SPI and BBIO.
[08:54:01] <LeoNerd> So if you have a program expecting a binary-io bitbang bus pirate, this would work
[08:54:16] <twnqx> LeoNerd: search spitool on github :P
[08:54:32] <twnqx> i want access to a ***** spi eeprom
[08:54:47] <twnqx> and my BP clone doesn't work with my spitool :(
[08:57:49] <theBear> interesting... what kinda interface/thing does a real pirate thinger plug into anyway ?
[08:58:01] <LeoNerd> Hm?
[08:58:21] <LeoNerd> BP is USB-UART (via an FTDI chip that's hard to recognise generically :/) to a custom 10pin header
[08:59:33] <twnqx> yes, but the bp-specific update software doesn't play with mine
[08:59:46] <twnqx> so the bootloader on this one is kinda strange
[08:59:52] <LeoNerd> Ah.. tricky
[16:30:19] <LeoNerd> Ooh. I think I just built a mega328pb binary :)
[16:37:55] <twnqx> ... congrats?
[16:38:28] <twnqx> i mean, is that something special?
[16:40:01] <inkjetunito> maybe it happened by an accident
[16:56:07] <R0b0t1`> https://bpaste.net/show/ad9bfc35d38a
[16:56:33] <R0b0t1`> I'm attempting to enable USART0. If I specify all bits of UCSR0B and UCSR0A, it fails.
[16:57:32] * cehteh forgot about C precendence rules, but i always use () around the (1<< something) | ...
[16:57:59] <R0b0t1`> yeah - it does right thing though.
[16:58:36] <liwakura> i dont think you are supposed to write to UCSR0A
[16:59:42] <cehteh> cant remember :D
[17:00:19] <R0b0t1`> liwakura: it ends up not mattering - it's mainly there as documentation
[17:00:25] <cehteh> http://git.pipapo.org/?p=muos;a=blob;f=src/muos/hw/atmel/avr/serial.c;h=92dde11b50c9540be351de2cd65fd127855a1ae4;hb=36a2eb6560080ac1a2e95b038205d963197e387e
[17:00:31] <R0b0t1`> the write to A and the B and C ones work
[17:00:32] <cehteh> that works for me :D
[17:02:46] <R0b0t1`> oh fuck I'm retarded
[17:02:49] <R0b0t1`> I used & instead of |
[17:03:37] <cehteh> lol
[17:03:47] <cehteh> i havent even looked at the commented out code :D
[17:07:33] <aczid> did y'all see https://www.stockfighter.io/ ?
[17:07:49] <aczid> it's an AVR based algotrading/hacking game :)
[17:17:51] <LeoNerd> Doh! spent ages trying to work out why my timing logic seems to have this odd division by a factor of 2 somewhere
[17:18:11] <LeoNerd> Turns out: I forgot to set the fuse so my external 16MHz crystal is being used, so it's running on internal 8MHz instead
[17:21:12] <cehteh> lol
[17:21:45] <inkjetunito> default settings? i think that would be even 8 MHz divided by 8 :D
[17:22:08] <LeoNerd> Yeah.. but then I have the prescaler set
[17:22:21] <inkjetunito> aah
[17:22:25] <LeoNerd> I've taken to awlays setting the clock prescaler in firmware as the first thing I do, so I'm not affected by the CKDIV8 fuse
[17:32:36] <cehteh> i am reading the fuses at start and set prescaler accordingly
[17:33:01] <cehteh> instead F_CPU i am considering a F_OSC additionally/alternatively
[17:33:41] <cehteh> would allow some more considstency checks in debug builds. hey one could even guess it from the watchdog OSC which is always 128khz
[17:46:21] <LeoNerd> Hrmmmm
[17:46:32] <LeoNerd> The .atdf for the mega328PB disagrees with the datasheet
[17:46:50] <LeoNerd> The .atdf says there's an efuse bit at 0x08, called CFD. The datasheet does not mention it
[17:51:50] <cehteh> try'n'error times :)