#avr | Logs for 2017-02-07

Back
[00:05:23] <Casper> or maybe you will
[00:05:47] <enhering> Yes... maybe.
[01:04:43] <_ami_> is there any board with following features?
[01:04:43] <_ami_> capable of at LEASt 1080p@60hz - preferably QHD (2560x1440@60hz) and nice would be UHD@60hz, and usb otg port.
[02:10:57] <Casper> _ami_: not on avr, you are looking for arm based stuff with an accelerated gpu
[02:11:15] <_ami_> yeah ARM
[02:11:20] <Casper> check the rpi3, it may do it
[02:11:29] <_ami_> rpi3 is slow :/
[02:11:41] <_ami_> probably we need 3x rpi3
[02:11:46] <_ami_> speed
[02:14:19] <Casper> what are you thinking to do?
[02:45:00] * daey hands _ami_ a display port cable. that should do it
[03:27:25] <Emil> _ami_: odroid
[03:27:49] <Emil> Or the intel based boards might do it
[09:40:55] <clean> I've got a generic serial programmer with a max232cpe and hex inverter chip. On the TTL side it has a 5v in & GND connector, and three connectors M, D & C which I assume are something to do with the data, like TX RX. Anyone know?
[09:53:25] <DKordic> clean: Hi. More info, like home page URL?
[09:56:13] <clean> DKordic: the programmer has a whole only says 'SERIAL PROG. JW REV1 2008'
[09:56:38] <clean> the hex inverter chip is http://www.ti.com/lit/ds/symlink/sn74ls04.pdf
[10:01:07] <DKordic> clean: Programmer for what?
[10:03:34] <clean> DKordic: just says serial programmer, with 5v on one side and RS232 on other. I assume it's for programming MCs from computer via RS232
[10:03:59] <clean> All I need is the max232, but it's solderedd.
[10:05:27] <DKordic> That is enough nonsense for a `/kick' :) . First warning anyway.
[10:05:54] <clean> DKordic: sorry?
[10:06:24] <DKordic> I was slightly joking. WTF are You even trying to do?!
[10:08:26] <clean> I want to shift RS232 voltage levels to lower TTL to setup serial communication between PC COM port and a mc. But the chip I need, the max232, is stuck on some sort of programmer. I was just wondering if anyone has an idea of what the letters M, C & D might stand for in context of serial communication.
[10:10:29] <Lambda_Aurigae> clean, got a pic of that or document or something?
[10:11:07] <Lambda_Aurigae> I doubt that is a "generic" programmer
[10:11:11] <Lambda_Aurigae> as there is no such thing.
[10:12:23] <DKordic> Why don't you buy an appropriate IC and make the circuit from it's datasheet?!
[10:12:26] <Lambda_Aurigae> those letters mean nothing for serial communication.
[10:12:55] <Lambda_Aurigae> they are specific to the programmer itself and/or the chip or board it is designed to program.
[10:13:13] <clean> DKordic: don't have the money. If I can't figure this out, I'll just desolder the IC off it I need in the morning.
[10:13:42] <Lambda_Aurigae> well, first thing you need to do is get a schematic for that programmer board...figure out how it is hooked up..what is connected to what.
[10:13:52] <Lambda_Aurigae> that requires looking, thinking, using some common sense, pencil, and paper.
[10:14:05] <Lambda_Aurigae> you have pinouts for the chips on the board.
[10:14:55] <Lambda_Aurigae> or remove the 7404 chip and use the existing board and rewire the i/o from the max232 to fit your needs.
[10:16:05] <Lambda_Aurigae> this is a very common case of "standard" ISN'T!
[10:18:48] <clean> Lambda_Aurigae: thanks I'll try to figure it out. I did look at all the pinouts, but seems to be unusual setup. Anyway I'll get there or just desolder chip.
[10:19:34] <clean> I don't think I could rewire the board, as it's pcb with surface mount components
[10:20:11] <Lambda_Aurigae> so you are going to take a surface mount chip off the board and reuse it?
[10:20:15] <Lambda_Aurigae> sounds just as difficult.
[10:21:07] <Lambda_Aurigae> from the sound of it, that board is a programmer...not a simple serial feed through obviously due to the 7404 chip.
[10:21:44] <Lambda_Aurigae> but by removing the 7404 you should be able to attach wires to the input and output pins of the max232 and feed those over to your microcontroller board and voila.
[10:22:59] <Lambda_Aurigae> http://picprojects.org.uk/projects/images/SimpleRS232.jpg
[10:23:02] <Lambda_Aurigae> or build that.
[10:25:03] <clean> Lambda_Aurigae: If there are not any issues on between the max232 and rs232 port, that should work. thanks. Does that build you linked shift the 5V in to rs232 levels?
[10:25:47] <Lambda_Aurigae> you didn't look?
[10:26:07] <Lambda_Aurigae> it's a level shifter....does what the max232 does with a couple of transistors and a few other parts.
[10:27:36] <clean> thanks. I'll do that if I have the components. I'm not too good reading schematics. I can follow them, just takes a long time.
[10:29:41] <Lambda_Aurigae> if you can't follow that schematic I recommend not trying to do electronics without a class or three first.
[10:47:26] <enhering> Hi. Guten morgen.
[11:21:36] <DKordic> Good morning enhering.
[14:35:06] -ServicesBot:#avr- [Global Notice]: Due to a recent security breach we are asking all users to change their passwords. Please use /msg ServicesBot <oldpassword> <newpassword>. We apologize for this inconvenience and are working to prevent further security incidents.
[14:35:43] * longus_catus smacks ServicesBot
[14:36:07] <specing> :)
[14:36:25] <longus_catus> That kind of stuff used to earn you a K-Line
[14:36:31] <grafi_> *password changed*
[14:37:05] <ServicesBot> longus_catus: it earned me several today
[14:37:24] <ServicesBot> so i decided to avoid doing it on #freenode because I am getting tired of switching vpn servers to evade
[14:37:32] <specing> Lol
[14:37:46] <Chillum> lol
[14:37:52] * Chillum sends ServicesBot his password
[14:38:10] <specing> ServicesBot: btw there is Freenode staff here. LoRez ^
[14:38:29] <ServicesBot> s/staff/former staff/
[14:38:35] <LoRez> Perhaps you should read?
[14:38:37] <ServicesBot> LoRez is staff-emeritus
[14:38:44] <specing> omg I'm getting old
[14:38:50] <Chillum> lulz
[14:38:56] <Chillum> nice try
[14:39:22] <LoRez> Doesn't mean I don't know who to talk to :-)
[14:39:22] <Chillum> lol sent: /msg ServicesBot overlord overlord123, then got ServicesBot!~services@192.240.96.68 failed to login to Chillum. There has been 1 failed login attempt since your last successful login.
[14:39:34] <Chillum> obviously not a Lone Gunmen fan
[14:40:17] <Chillum> some with skill would have been using a different IP/identity to try out passwords
[14:40:20] <specing> emeritus? ALTERNATIVE FACT :D
[14:50:19] <Lambda_Aurigae> Jartza, http://dmitry.gr/index.php?r=05.Projects&proj=08.%20uM0 something you will appreciate
[14:51:12] <Lambda_Aurigae> arm cortex M0 emulator on an attiny85!
[14:55:21] <longus_catus> atmel studio and this attiny2313A are making me unhappy....it cant be debugged....it enables debugwire then it cant be programmed until i use avrdude to fix it
[14:55:41] <longus_catus> it cant be communicated with at all.
[14:55:44] <specing> longus_catus: -> ARM
[14:56:33] <longus_catus> I'm kind of used to java debugging where it sort of works
[14:57:58] <longus_catus> is there a way to do step by step debugging with the attiny2313A and atmel studio? with debugwire? but debugwire just kind of bricks it...the only thing the reset line is connected to is the programmer
[14:59:10] <Lambda_Aurigae> looks like dW is the only debugging method on that chip.
[14:59:33] <longus_catus> maybe that wire is rusty
[15:00:25] <Lambda_Aurigae> put some new electrons in it..the old ones are worn out.
[15:01:23] <longus_catus> when i go to device programming (control-shift-p) only ISP is listed as a method.... that doesnt make sense
[15:06:41] <longus_catus> I guess this programmer doesn't do HVP
[15:51:30] <Jartza> Lambda_Aurigae: coolest :)
[16:05:09] <Lambda_Aurigae> longus_catus, what programmer hardware?
[16:33:55] <longus_catus> jtag2ice mkII-CN (china edition)
[16:34:11] <longus_catus> err CN is on the label...so just mkII (china edition)
[16:35:34] <Tom_L> no not many ISP programmers do HVP
[16:37:07] <longus_catus> the jtag2ice mkII is one of the ones that do not?
[16:37:29] <longus_catus> maybe i can just use a level converter for that debug pin
[16:37:34] <Tom_L> i doubt it
[16:38:32] <longus_catus> is there a factoid bot in here?
[16:38:40] <Tom_L> i think their new one does it all
[16:38:45] <Tom_L> no
[16:39:01] <longus_catus> the one by atmel....or the china dudes?
[16:39:13] <Tom_L> atmpic
[16:40:13] <Tom_L> http://www.digikey.com/product-detail/en/microchip-technology/ATATMEL-ICE/ATATMEL-ICE-ND/4753379
[16:40:50] <Tom_L> http://www.atmel.com/Images/Atmel-42330-Atmel-ICE_UserGuide.pdf
[16:41:28] <Tom_L> Programming (JTAG, SPI, UPDI) and debugging of all Atmel AVR 8-bit
[16:41:29] <Tom_L> microcontrollers with OCD support on either JTAG, debugWIRE or
[16:41:29] <Tom_L> UPDI interfaces
[16:43:38] <Lambda_Aurigae> hey...can now buy atmel products from microchip direct online store!
[16:43:47] <Lambda_Aurigae> time to see if they will sample stuff.
[16:44:04] <Tom_L> sample me one of those programmers :D
[16:45:17] <Lambda_Aurigae> hehe.
[16:45:25] <Lambda_Aurigae> ok...time to head homely.
[16:46:14] <Tom_L> take the top down on the way. it's like 68 deg here
[16:46:33] <Lambda_Aurigae> 28F here today.
[16:46:49] <Lambda_Aurigae> and taking the top down on the pickup will require a large-ish canopener.
[16:46:55] <Tom_L> it'll be that here tomorrow then back up to 80
[16:47:27] <Lambda_Aurigae> was 58F here yesterday.
[16:47:32] <Lambda_Aurigae> anyhoo..time to go home.
[19:46:19] <enhering> Hi. Can I ask a question about atmel studio?
[19:47:21] <rue_house> only if its regarding an atmega8
[19:47:47] <enhering> atmega328, but the question is generic.
[19:47:52] <rue_house> if its about any other controller you have to ask about gcc-avr or avrdude
[19:48:17] <rue_house> but wait, its tuesday, that means you have to asks a tiny13 question first
[19:48:25] <longus_catus> tiny85
[19:48:38] <enhering> I only used IDE debuggers back in Borland Pascal, so I may be wrong about this.
[19:48:46] <rue_house> unless the wind was blowing south for more than 2 hours in Sidney australia
[19:49:03] <enhering> When I step into code, code should be executed line by line, in sequence, right?
[19:49:17] <rue_house> in which case all querstions have to be submitted in morse code
[19:49:30] <rue_house> enhering, that kinda debugging can be trickey
[19:49:37] <rue_house> what are you trying to solve?
[19:50:21] <enhering> There are lines of code that are being missed. The debugger pass by them as if they were not there
[19:50:33] <rue_house> ah
[19:50:45] <rue_house> when the compiler does the code, some things get combined
[19:50:55] <rue_house> and aren't effectivly there
[19:51:34] <specing> We need carabia back again
[19:51:39] <enhering> This makes sense, but jumping over variable declarations in a function does not make sense. The variables do not even show in locals window
[19:51:46] <specing> then we'll together MAKE AVR GREAT AGAIN
[19:51:52] <enhering> where is carabia?
[19:52:34] <rue_house> there is no code for declaring a variable
[19:52:48] <rue_house> your just saying it exists
[19:53:11] <rue_house> sometimes, the variable dosn't even exist as such, its just a result
[20:03:39] <enhering> rue_house: https://gist.github.com/enhering/6c0b17e30ebf36dd6b853da466870a1e
[20:04:14] <enhering> when debugger reaches line 7, nBegin, nSum and sData are not even listed in locals, or traceable
[20:05:08] <Tom_L> sometimes you need to declare where it exhists too
[20:09:43] <rue_house> they may not exist like that
[20:10:09] <enhering> that is truly mystical to me
[20:10:14] <rue_house> and I do NOT suggest using OOP on an 8 bit avr
[20:10:26] <rue_house> enhering, have you ever programmed in assembler?
[20:10:36] <Tom_L> volatile for example
[20:10:45] <enhering> yes, but a long time ago
[20:10:48] <rue_house> enhering, yea
[20:11:07] <rue_house> those variables wont exist, the are just returned
[20:11:20] <rue_house> as values
[20:11:29] <rue_house> look at the assembler output of the compiler
[20:12:47] <rue_house> use C and dont use a ide debugger
[20:12:56] <rue_house> whats going wrong that your trying to debug
[20:14:08] <rue_house> and dont try to use a ide debugger for debugging interupts
[20:15:02] <enhering> What is wrong is that after the switch, nBegin equals 255.
[20:15:32] <enhering> If I comment the switch statement, and say nBegin = 62, then nBegin equals 62.
[20:15:37] <rue_house> singed/unsigned mismatch
[20:15:54] <rue_house> change the function to just return a static value
[20:15:57] <enhering> If I change the switch for a series of nested ifs, nBegin gets crazy again
[20:16:13] <rue_house> lets see the code thats recieving the 255?
[20:17:19] <rue_house> ok, if you enable that nBegin=62 does it behave?
[20:17:30] <rue_house> what optimization level are you using on the compiler?
[20:18:09] <rue_house> after that code, if you turn an led on if the value is 255, and off if its not, does it actually turn on?
[20:18:22] <rue_house> debug led is your friend
[20:18:27] <rue_house> not the debugger
[20:18:59] * rue_house goes back to sleep
[20:20:09] <rue_house> bet its out of memory and overwriting things too
[20:22:52] <rue_house> task.start( &self, DESIGN_ROBOT_BODY );
[20:23:46] <rue_house> subtask.start( &self, DESIGN_HAND_FOR_ROBOT_BODY );
[20:24:53] <rue_house> interruptions.cache( &self, EAT, EAT, SLEEP, PEE, EAT, DRINK, SLEEP, EAT, SLEEP, EAT, PEE, SLEEP, EAT, DRINK, NULL)
[20:25:12] <rue_house> ;
[20:26:01] <longus_catus> so you can use a timer as an adc right?
[20:26:32] <rue_house> RC, yea
[20:28:04] <longus_catus> i have an attiny2313V-10PU. do you have anything cool to recommend to do with it
[20:28:16] <rue_house> 2313..
[20:28:19] <longus_catus> gonna hook up a ft232h to the serial
[20:28:23] <rue_house> make a POV led thing
[20:28:56] <longus_catus> it's only got uart, usart, timer, and pwm.... http://www.atmel.com/Images/Atmel-2543-AVR-ATtiny2313_Datasheet.pdf
[20:29:30] <longus_catus> unless "16 bit...capture" means adc
[20:29:50] <rue_house> no
[20:30:00] <rue_house> its old, you need to use it like an old PIC
[20:31:04] <longus_catus> do basic, application specific mindless things that aren't very amusing
[20:31:32] <longus_catus> i did buy it for a very specific reason, but now i have a couple extra
[20:32:53] <longus_catus> anyway.....it has 8 bit parallel interface, that could do a lot of.... useful... things....even be a dac with some uh.... things that turn electricity into heat
[20:32:54] <rue_house> do you ever play with hobby servos?
[20:33:27] <longus_catus> no...i have an rc car in the closet....but that's it... but what I do have that i'd like to do....
[20:34:01] <longus_catus> http://i.imgur.com/NMK7X0s.png
[20:34:20] <rue_house> a really small motor
[20:34:57] <longus_catus> yep....has 3 inputs... with weird names on the schematic...like w and y or something
[20:35:59] <longus_catus> it's already built i jsut want to test it because...i moved it from one board to another/model to another/coils were different sizes/required resolding coils on new flex piece
[20:36:15] <rue_house> yea, the 3 phaseses
[20:36:54] <rue_house> w u v
[20:38:14] <longus_catus> yeah, that's what the schematic says
[20:38:37] <longus_catus> w to the left, u to the top v to the right
[20:38:55] <rue_house> you need to use a constant current bipolar driver
[20:39:04] <rue_house> and there is no feedback, so its more complex
[20:39:21] <longus_catus> i gather from the diagram, the only feedback is stall
[20:39:47] <rue_house> the output coils dont all enguage at once, usually two are active and one is used for a sense coil
[20:40:07] <rue_house> there is a voltage spike on it that gives away when it needs to be triggered
[20:40:23] <rue_house> er, that the next step in the phase sequence needs to happen
[20:40:44] <longus_catus> amazing... that thing is so small i think the avr might be able to drive it by itself
[20:40:51] <rue_house> no
[20:42:03] <longus_catus> would it not work, harm the avr, or harm the motor?
[20:42:29] <longus_catus> it has so little torque....so it spins at high rpm
[20:43:42] <rue_house> coils are evil
[20:44:29] <longus_catus> so could i turn it into an ASK transmitter then?
[20:44:40] <longus_catus> i'm kidding...
[21:20:56] <enhering> Amazing. Turning off all optimizations fixed the code. (-O0)
[21:22:41] <enhering> carabia left the channel forever?
[21:56:10] <rue_house> yea
[21:56:15] <rue_house> what did you have it at -O3?
[21:56:26] <rue_house> o3 breaks things most usually
[21:57:17] <rue_house> did carabia provide any positive contributions to the channel ever?
[22:05:44] <Casper> carawho?
[22:08:55] <rue_house> hu? not sure