• Electrical Engineering V2
    5,003 replies, posted
Are you using the pin change interrupt? Do you have the watchdog timer enabled? Try reading out the MCUSR register right at the start of the code and reset it to zero. That will give you an idea what caused the reset.
Figured out how to use an EEPROM using a [URL="http://www.hobbytronics.co.uk/arduino-external-eeprom"]simple to follow tutorial[/URL], at first it was confusing but after reading trough it a few times I managed to get it to print the value of a LDR onto different addresses. What I really wanted though was a way to use ATtiny84/85's to do that so I can make something like a small sensor thingy I can read the data from later (i.e. sticking an attiny with stuff on a weather baloon to see how cold it is up there, using 2 EEPROM's, 1 for heat and the other for altitude/pressure). Luckily some chap [URL="http://0xfebytes.blogspot.nl/2013/03/use-attiny85-with-i2c-eeprom.html"] made an article[/URL] based off the previous one I read, so it was piss easy to figure out what I had to change. I wanted to use EEPROM's a while ago as I accidentally bought 2 because I did not know what I could use them for, but now I finally know how to use them [editline]29th September 2013[/editline] I keep having errors with the version used for ATtiny's though so I gotta figure out what is causing that.
What is up with Xilinx's website? I register to download the software (using mailinator instead of gmail because gmail isn't corporate) and eventually get to a download link... And I have to use this dodgy Java applet to download it, "to make sure it downloads safely", which is apparently much better than chrome's built in download manager. So I leave it on overnight (rural UK) and I'm not too surprised when the applet's frozen in the morning. I've popped over to pirate bay, and I'm now torrenting a free piece of software - is this a new scheme to reduce server load? :v: Ooh, and I've ordered a Papilio One 250k! FPGAs look really interesting!
[QUOTE=r0b0tsquid;42348620]What is up with Xilinx's website? I register to download the software (using mailinator instead of gmail because gmail isn't corporate) and eventually get to a download link... And I have to use this dodgy Java applet to download it, "to make sure it downloads safely", which is apparently much better than chrome's built in download manager. So I leave it on overnight (rural UK) and I'm not too surprised when the applet's frozen in the morning. I've popped over to pirate bay, and I'm now torrenting a free piece of software - is this a new scheme to reduce server load? :v: Ooh, and I've ordered a Papilio One 250k! FPGAs look really interesting![/QUOTE] Welcome to corporations doing stuff because duh
[QUOTE=LoneWolf_Recon;42341483]Anyone familiar with AVRs and avr-gcc interrupts? I've had this problem a long while back but now its resurfaced. In a nutshell, I have a interrupt vector to run whenever a 38kHz IR receiver detects a signal, however instead of running the interrupt routine, it simply resets the AVR. Advice?[/QUOTE] Not so much, but I do have some code I've written that generates the 38kHz carrier on-device using timer interrupts, if that's of any use. I'd recommend against any sort of library function for this stuff - you're better off reading the datasheet and stuffing bits into the relevant registers. Also, are you using PC6 (PCINT14, and also the reset pin) for your interrupt input? Because if you are you'll need to set the RSTDISBL fuse bit (carefully!).
This is the final idea for my circuit (it's a 3 digit counter), thoughts? [t]http://puu.sh/4DxM8.png[/t] The two PTM switches are to count and to reset.
[IMG]http://i11.photobucket.com/albums/a166/ballsandy/CGS_0361.jpg[/IMG] I don't even know where to start troubleshooting this TV. It's displaying something right out of a 70's space sci-fi flick.
Clearly a problem with the deflection coils.
[QUOTE=DrDevil;42343741]Are you using the pin change interrupt? Do you have the watchdog timer enabled? Try reading out the MCUSR register right at the start of the code and reset it to zero. That will give you an idea what caused the reset.[/QUOTE] Yes, I'm using the pin change interrupt, I've set the proper registers in the PCICR and PCMSK2 (Its PCINT16 and I'm using Mega168/88). However I made two stupid mistakes of including reti() in each interrupt handler, also the handler I had for PCINT16 I mislabeled and should've been PCINT2 as the third (PCINT2) register handles PCINT16 thru 23.
How does two-way radio work? How come cell towers need a massive tower to cover an area, but a tiny cell phone can transmit back to it without many problems?
[QUOTE=Agent766;42353052]How does two-way radio work? How come cell towers need a massive tower to cover an area, but a tiny cell phone can transmit back to it without many problems?[/QUOTE] The cell tower's receiver is much more sensitive, while the transmitter is also much more powerful.
[QUOTE=pentium;42351694] I don't even know where to start troubleshooting this TV. It's displaying something right out of a 70's space sci-fi flick.[/QUOTE] Check that the power supply is good first, particularly the lower voltage flyback outputs to the yoke, the HV is clearly fine or you'd see nothing. If I was to make a guess I'd say you have a severe case of power supply ripple.
[QUOTE=pentium;42351694][IMG]http://i11.photobucket.com/albums/a166/ballsandy/CGS_0361.jpg[/IMG] I don't even know where to start troubleshooting this TV. It's displaying something right out of a 70's space sci-fi flick.[/QUOTE] Can we get a video or does it stay exactly like that?
[QUOTE=SubbyV-2;42355106]Can we get a video or does it stay exactly like that?[/QUOTE] The lines scroll outwards from the dot in the middle. I'll try a video later. The problem with this TV is that it's a live chassis. If I plug it into an unpolarized outlet the entire fucking thing goes live and kills upon contact. It doesn't even have a rubber anode cap. It's just a bent piece of wire. [IMG]http://i11.photobucket.com/albums/a166/ballsandy/DPP_0033.jpg[/IMG] RCA shaved every penny they could on this.
[QUOTE=pentium;42356953]The lines scroll outwards from the dot in the middle. I'll try a video later. The problem with this TV is that it's a live chassis. If I plug it into an unpolarized outlet the entire fucking thing goes live and kills upon contact. It doesn't even have a rubber anode cap. It's just a bent piece of wire. [IMG]http://i11.photobucket.com/albums/a166/ballsandy/DPP_0033.jpg[/IMG] RCA shaved every penny they could on this.[/QUOTE] It's not that unusual with older equipment to have the chassis tied to one side of the AC line, just make sure you put a polarized plug on it, at the very least while your working on it, or if you happen to have one laying around use an isolation transformer. Keep in mind you can't probe it with a scope without an isolation transformer or disconnecting the scope earth, which is kinda unsafe but as long as precautions are taken it's fine. That big electrolytic looks highly suspect to me, given the age it's most likely leaky so I'd go straight and replace it. Also if someone has been in it before that would explain the missing anode cap.
Anyone know of a good current limiting IC that can handle a fair load of current and has a wide voltage range? I primarily need it for powerful white LEDs. Think something along the line of the LM317, except the current can be set with more common 1/4watt resistors without frying them. Currently using LM317's but they need beefy resistors for current limiting, and often also oddball values for the desired current. Yeah, I know I can just hook resistors in series & parallel to achieve the desired effect, but I'd like a simpler solution
[QUOTE=Van-man;42357696]Anyone know of a good current limiting IC that can handle a fair load of current and has a wide voltage range? I primarily need it for powerful white LEDs. Think something along the line of the LM317, except the current can be set with more common 1/4watt resistors without frying them. Currently using LM317's but they need beefy resistors for current limiting, and often also oddball values for the desired current. Yeah, I know I can just hook resistors in series & parallel to achieve the desired effect, but I'd like a simpler solution[/QUOTE] Roll your own, couple of transistors, op-amp and a small current shunt.
[QUOTE=Van-man;42357696]Anyone know of a good current limiting IC that can handle a fair load of current and has a wide voltage range? I primarily need it for powerful white LEDs. Think something along the line of the LM317, except the current can be set with more common 1/4watt resistors without frying them. Currently using LM317's but they need beefy resistors for current limiting, and often also oddball values for the desired current. Yeah, I know I can just hook resistors in series & parallel to achieve the desired effect, but I'd like a simpler solution[/QUOTE] almost any good buck regulator can be used as an LED driver.
Had to get creative to make a replacement for a broken optocoupler. [thumb]http://i.cubeupload.com/GhiNp8.jpg[/thumb] Of course I figured out the pins on that old optocoupler were reversed after I took that picture.
[QUOTE=Chryseus;42357709]Roll your own, couple of transistors, op-amp and a small current shunt.[/QUOTE] Was hoping for a low parts count solution.
[QUOTE=Van-man;42357970]Was hoping for a low parts count solution.[/QUOTE] How about a [url=http://www.linear.com/product/LT3478]LT3478[/url] ?
[QUOTE=Chryseus;42358173]How about a [url=http://www.linear.com/product/LT3478]LT3478[/url] ?[/QUOTE] Was also hoping for something in a package that even a moron could solder with a hardware store soldering iron.
[QUOTE=Van-man;42358526]Was also hoping for something in a package that even a moron could solder with a hardware store soldering iron.[/QUOTE] Most purpose made LED drivers pretty much all come in surface mount, it should not be too difficult as long as you have a small tip and some flux.
Still waiting for my FPGA board to arrive but I'm having loads of fun with the development software while I learn VHDL! I've made the beginnings of an FM transmitter - the antenna output gets toggled at a high frequency (128MHz), and the output of a delta-sigma ADC running at a lower frequency causes the output to lose edges to modulate the frequency downwards. I've used like two percent of the slices, this is mind boggling :v: [img]http://i.imgur.com/vyMAByq.png[/img] Will see how that dithering works out, else I've got loads more ideas. Would need some analogue magic on the output, else I'd also be transmitting on 300MHz, 500MHz... not going to be very high power though so.
Found this little gem: [URL="http://www.phy.davidson.edu/fachome/jny/optics/burle%20electro_optics.pdf"]RCA Electro-Optics Handbook[/URL] Found it quite useful for IR sensors, etc.
[QUOTE=r0b0tsquid;42372465]Still waiting for my FPGA board to arrive but I'm having loads of fun with the development software while I learn VHDL! I've made the beginnings of an FM transmitter - the antenna output gets toggled at a high frequency (128MHz), and the output of a delta-sigma ADC running at a lower frequency causes the output to lose edges to modulate the frequency downwards. I've used like two percent of the slices, this is mind boggling :v: [img]http://i.imgur.com/vyMAByq.png[/img] Will see how that dithering works out, else I've got loads more ideas. Would need some analogue magic on the output, else I'd also be transmitting on 300MHz, 500MHz... not going to be very high power though so.[/QUOTE] VHDL is incredibly powerful, but at the same time it's such a picky bag of dicks. Had to make a low area 32 bit AES encryption architecture in it for my final year and it was such a colossal pain. The individual modules all functioned correctly but I always seemed to lose a cycle somewhere in the pipeline when I glued it all together and I couldn't ever find out why. Made it using about 200 odd slices though so wasn't too bad. It was pretty slow though. Kind of wish I'd used verilog instead.
This image was taken at ~27000m altitude, the weather balloon payload was successfully tracked with the APRS transmitter I had issues with a few days back. [IMG]https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-prn2/1374909_10201389715880820_854456950_n.jpg[/IMG]
[QUOTE=LoneWolf_Recon;42375529]Found this little gem: [URL="http://www.phy.davidson.edu/fachome/jny/optics/burle%20electro_optics.pdf"]RCA Electro-Optics Handbook[/URL] Found it quite useful for IR sensors, etc.[/QUOTE] Very nice :D I'd add it to the op but fp is not letting me edit
Managed to speed a 32-bit adder up from ~180MHz to 266 using a 7 stage pipeline! I'll probably end up using a 24-bit adder when I actually get the board, that's still like 13 bits of audio resolution, which is more than I need for a crappy digital signal like this :v:
[QUOTE=r0b0tsquid;42372465]Still waiting for my FPGA board to arrive but I'm having loads of fun with the development software while I learn VHDL! I've made the beginnings of an FM transmitter - the antenna output gets toggled at a high frequency (128MHz), and the output of a delta-sigma ADC running at a lower frequency causes the output to lose edges to modulate the frequency downwards. I've used like two percent of the slices, this is mind boggling :v: [img]http://i.imgur.com/vyMAByq.png[/img] Will see how that dithering works out, else I've got loads more ideas. Would need some analogue magic on the output, else I'd also be transmitting on 300MHz, 500MHz... not going to be very high power though so.[/QUOTE] I just got started with Verilog and this thing: [img]https://scontent-a-iad.xx.fbcdn.net/hphotos-ash3/p480x480/1016449_370709929727150_1026229158_n.jpg[/img] [code] module somefilename (input [15:0]SW, input [2:0]KEY, output [7:0]LEDR, output [2:0]LEDG); wire [2:0]Q; wire [7:0]A,B,ledconnect; assign A=SW[15:8]; assign B=SW[7:0]; assign Q = KEY; assign LEDG = ~Q; wire [7:0]c0,c1,c2,c3,c4,c5,c6,c7; assign c0 = ~SW[15:8]|SW[7:0]; assign c1 = SW[15:8]|~SW[7:0]; assign c2 = ~SW[15:8]; assign c3 = SW[15:8]&SW[7:0]; assign c4 = SW[15:8]+SW[7:0]; assign c5 = ~(SW[15:8]|SW[7:0]); assign c6 = SW[15]+SW[14]+SW[13]+SW[12]+SW[11]+SW[10]+SW[9]+SW[8]; assign c7 = (SW[15]+SW[14]+SW[13]+SW[12]+SW[11]+SW[10]+SW[9]+SW[8]+SW[7]+SW[6]+SW[5]+SW[4]+SW[3]+SW[2]+SW[1]+SW[0]); mux_8bit_8to1 a1(c0,c1,c2,c3,c4,c5,c6,c7,Q,ledconnect); assign LEDR=ledconnect; endmodule module mux_8bit_2to1(X,Y,s,M); input [7:0] X,Y; input s; output [7:0] M; assign M = ({8{~s}} & X) | ({8{s}} & Y); endmodule module mux_8bit_8to1(R,T,U,V,W,X,Y,Z,S,M); input [7:0] R,T,U,V,W,X,Y,Z; input [2:0] S; output [7:0] M; wire [7:0] N1,N2,N3,N4,N5,N6; mux_8bit_2to1 m0(R,T,S[0],N1); mux_8bit_2to1 m1(U,V,S[0],N2); mux_8bit_2to1 m2(W,X,S[0],N3); mux_8bit_2to1 m3(Y,Z,S[0],N4); mux_8bit_2to1 m4(N1,N2,S[1],N5); mux_8bit_2to1 m5(N3,N4,S[1],N6); mux_8bit_2to1 m6(N5,N6,S[2],M); endmodule [/code] etc
Sorry, you need to Log In to post a reply to this thread.