#avr | Logs for 2015-08-10

Back
[00:34:37] <TechIsCool> Jartza: I understand I original paid more then that per chip and still have fakes
[00:38:40] <Jartza> I paid $9 for breadboard-friendly ones, with non-fake chip
[00:39:07] <TechIsCool> where did you buy them. One of the big warehouses or?
[00:47:04] <Jartza> if I remember correctly it was sparkfun, but it's long time ago, so I can't be sure
[00:47:13] <TechIsCool> understood
[04:39:26] <pitastrudl> hi
[04:41:24] <pitastrudl> im trying to connect an atmega16u2 and send some assembly code to it, using flip. but nothing happens. I entered the "flash mode" by pressing hwb and reset together. should i exit that mode after flashing?
[04:41:43] <pitastrudl> led 0-4 are all lit up, before entering the mode only 1 was
[04:41:44] <pitastrudl> hm
[06:48:12] <Lambda_Aurigae> pitastrudl, I am guessing you are trying to send a .hex file, yes?
[07:00:21] <Jartza> ohhh
[07:00:33] <Jartza> ansi escapes ftw :)
[07:02:16] <Lambda_Aurigae> kewl.
[07:04:17] <Jartza> scrolling still doesn't work correctly, but other than that I'm almost done
[07:04:20] <Jartza> then just colors
[07:11:05] <Jartza> and I'm only implementing scrolling up
[07:13:48] <pitastrudl> Lambda_Aurigae no, assembly code
[07:14:03] <Lambda_Aurigae> pitastrudl, you have to compile it into a .hex file
[07:14:09] <Lambda_Aurigae> did you not read the manual?
[07:14:32] <pitastrudl> i do build and run, then open flip to flash it
[07:14:33] <pitastrudl> hm
[07:14:42] <pitastrudl> ill re-read it i guess
[07:14:42] <Lambda_Aurigae> build and run?
[07:15:00] <Lambda_Aurigae> oh, you are using atmel studio I guess.
[07:15:06] <Lambda_Aurigae> well, flip wants a .hex file.
[07:17:19] <Lambda_Aurigae> like pretty much every other avr programmer out there.
[07:17:41] <pitastrudl> yeah im using avr4
[07:17:47] <pitastrudl> it works at my friends place
[07:17:49] <pitastrudl> but not for me
[07:17:50] <pitastrudl> ¯\_(ツ)_/¯
[08:11:55] <leehambley> does anyone have a reference, or tutorial they could point me at to build a state machine for something that talks AT commands, over serial ?
[08:11:57] <leehambley> I'm struggling
[08:15:00] <Tom_itx> https://en.wikibooks.org/wiki/Serial_Programming/Modems_and_AT_Commands#Welcome_to_the_World_of_State-Machines
[08:18:23] <leehambley> thanks Tom_itx
[08:18:56] <leehambley> I'm more or less comfortable with the idea of a state machine, but I probably don't put the serial comms *in* the state machine, right ?
[08:19:03] <leehambley> I guess I asked the question badly :)
[08:19:15] <leehambley> as a reference https://gist.github.com/nmandery/1717405 makes absolute sense
[08:20:21] <leehambley> I'll read that whole wiki beek :)
[08:20:22] <leehambley> book*
[08:29:05] <twnqx> If they are lucky they have implicitly managed to create a state machine which works.
[08:29:07] <twnqx> lol
[08:33:23] <leehambley> I'm very new to all this, and perhaps a SIM908 is not the ideal starting device to learn with, especially since my devboard seems to expose the serial ports for the GPS and GSM separately, which I've never seen any other dev board doing :-\ cheap chinese crap from Ebay :(
[08:36:21] <rue_school> I'd like to see implementations of state machines other than that which I have done
[08:40:29] <leehambley> I'm just confused as hell about how to mediate all the communication/etc that I have
[08:40:42] <leehambley> especially if there's two things talking over the same USART and I have to drive two state machines
[08:40:47] <leehambley> (GPS and GSM)
[08:41:01] <leehambley> but the entry barrier is rather steep when you're coming at this havning never done microcontroller progamming before
[08:41:04] <leehambley> at least I can write C :-\
[09:46:01] <osteri> or you can do "switch case" -state machine, it's more simple imo
[09:46:14] <osteri> i think it's faster as well
[09:52:31] <twnqx> if you did lowlevel programming on the likes of C64 and old DOS based PCs
[09:52:35] <twnqx> there's not much difference.
[10:30:52] <pitastrudl> just gonna leave this here http://www.avrfreaks.net/forum/atmega16u2-0, sorry
[11:13:48] <phinxy> What kind of sensor should i get to measure a tyres RPM?
[20:29:11] <Martin90> Hello, I am looking for code for USART ECHO test for atmega16a
[20:29:15] <Martin90> can somebody help here ?
[20:29:47] <Martin90> my version doesn't work as it should
[20:30:20] <Martin90> here is my code -> http://pastebin.com/q1NEmN3K
[20:44:42] <Martin90> anybody ?
[20:47:14] <Casper> are you sure that the clock speed is fine?
[20:50:32] <Martin90> yes
[20:50:43] <Martin90> Transimiting data outside the uC works fine
[20:51:19] <Martin90> but when I receive it from outside and then transmit it back it is 80% garbage
[20:51:27] <Martin90> altoght contains some of the characters
[20:51:49] <Casper> internal RC? or external crystal?
[20:51:56] <Martin90> Internal 1 Mhz
[20:52:57] <Martin90> I see that you are trying to blame clock source ?
[20:52:57] <Casper> that is most likelly your issue
[20:53:14] <Casper> the RX and TX tolerances are different
[20:53:20] <Martin90> ok but how do you explain that transmision works correct
[20:53:36] <Casper> your computer may tolerate better the difference in clock
[20:53:54] <Martin90> have you seen my code ? Is it right in your opinion ?
[20:54:11] <Casper> I didn't looked much
[20:54:39] <Casper> don't feels like doing coding tonight, but by experience, I never got luck with internal clock for uart
[20:54:54] <Casper> which is actually an issue for one of my project...
[20:55:18] <Martin90> the question is switch to exteral 8 or 16 mhz ?
[20:55:23] <Casper> the crystal would be too big and expensive, and would mean I need to use a bigger chip than what I already have :D
[20:55:40] <Martin90> to big and to expensive o.0 ?
[20:55:51] <Martin90> 2$ and 2 cm is too big ? ;P
[20:56:07] <Martin90> too*
[20:56:16] <Casper> I may have to fit it in a 1/2" pipe
[20:57:24] <Martin90> hmm
[20:57:43] <Martin90> in general the cristal should generate stable signals
[20:58:06] <Casper> yes, and they do, specially when you use like a 18.432MHZ :D
[20:58:18] <Martin90> hah xd
[20:58:55] <Martin90> even that may generate mess with voltage drops
[20:59:22] <Casper> I'm checking PCM and manchester
[20:59:59] <Martin90> manchester ?
[21:01:20] <Casper> yeah, it have the advantage of somehow combining the clock and the signal into a single signal
[21:01:29] <Casper> so you recover the clock, then you can sync
[21:04:30] <Martin90> what do you think is the best wireless option for AVR ? I mean with at least 25 m range
[21:06:45] <Casper> not sure
[21:06:54] <Casper> didn't shopped around for them yet
[21:07:10] <Casper> but... I may...
[21:07:44] <Casper> thing is... the power compagny decided to steal a frequency band for their new meter, and thanks to the stupid CRTC rules...
[21:08:14] <Casper> basically, to be able to make a complain, you need to be a canadian based licencee.
[21:08:17] <Casper> there is none
[21:08:20] <Casper> so
[21:08:50] <Casper> nobody can complain, except HAM operator, which... don't care much about that band anyway, as they can't transmit on high power on it
[21:08:55] <Casper> and is full of junk
[21:11:25] <Martin90> I didn't know
[21:11:57] <Martin90> I was testing one of the wifi module
[21:12:31] <Martin90> but really I want to make my own rf module with quite decent range and stable
[21:16:28] <Martin90> ok have to go, see you ;)