Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Keebler
Aug 21, 2000
Could someone help me out with a simple (I think, I'm probably missing something fundamental here) question on power switching? I'm puttering around with stepper motors and was reading through this:

http://www.cs.uiowa.edu/~jones/step/circuits.html#practvr

The left diagram in fig. 3.7 is what I'm looking at. I understand *how* it works but not necessarily why you have to use a buffer (aside from protecting the logic circuit from the motor windings in the event the transistor fails). If the logic level is 5v all around and your control can sink the 10mA, couldn't you just directly control the transistor, say from a PIC, without the buffer?

Adbot
ADBOT LOVES YOU

Keebler
Aug 21, 2000

mtwieg posted:

Not getting much response I see. I'm I going too fast/slow? Too technical? Too boring?

No no this is good, keep 'em coming!

Is there any chance you could rename that pdf you linked in the first post? It's name is showing up as a bunch of unreadable characters and my computer won't let me download it.

Keebler
Aug 21, 2000
Does anyone have any experience with using SRAM chips in projects? Ideally I'd like two 1 MByte chips but due to price I might drop down to 512 KByte modules. The problem I'm running into is how these chips are packaged. Everything seems to be either TSOP or BGA variants and I seriously doubt I'd be able to solder those to a board by hand. Has anyone had any luck in this area or know of anyone who makes and sells breakout boards?

Keebler
Aug 21, 2000

mtwieg posted:

TSOP isn't too bad. I've done them with just an Iron and some solder wick (can be bought at any radio shack). A magnifying glass and some liquid flux also helps, but it's far from unfeasible. BGA, on the other hand, would require solder paste and hot air at the least.

Also you could look at a couple of the adapter boards here (near the bottom of the page):
http://www.sparkfun.com/commerce/categories.php?c=20

TSOP can be a lot of different things; could you link the datasheet?

This is what I was originally looking at:

http://www.issi.com/pdf/61-64WV10248.pdf

After I made the post though I realized that it and all the other similar modules at that size were 3/3.3v, I need something that can operate at 5v. I poked around a little more though and came up with this:

http://download.cypress.com.edgesuite.net/design_resources/datasheets/contents/cy7c1049d_8.pdf

It's 512k rather then the 1 meg that I was hoping for but it's really cheap and as a bonus comes in a SOJ package. I think I can find a through hole socket for that...

Keebler
Aug 21, 2000

Hillridge posted:

If you can afford to burn some power, just put a simple 3 terminal regulator in there to drop it to 3.3V.

Hand soldering a BGA is a shot in the dark at best, even with hot air. I try to avoid them on boards I design unless it's my only choice, or I need the space. TSOP is no problem, you just need practice. I could solder that TSOP faster than the leaded version so long as I have a good iron and plenty of flux.

If you're interested in soldering SMT parts, this guy is spot on in his advice: http://www.youtube.com/watch?v=3NN7UGWYmBY

Thanks, it's looking like I have to go to the TSOP package anyway. It doesn't look like they sell through hole SOJ sockets. I'll have to pickup a few cheap parts to practice on. Poking around I see people even do it using a toaster over! Maybe I'll give that a shot for shits and giggles.

Keebler
Aug 21, 2000
Would anyone be able to help me out deciphering the data sheet for a flash chip I'm trying to read and write to from an ATMega?

The data sheet is available here:
http://jthirst.zerofold.com/files/AT29C512.pdf

I had thought that the sector programming operation was the just a series of byte load operations that occur to a sector within a specific time window. In looking at the waveform diagrams though it seems like they are different. !CE and !WE appear to occur at the same time and for the same duration for sector programming despite the description for a byte load indicating that it's used in programming a sector as well.

Keebler
Aug 21, 2000
I finally scrounged up enough money for The Art Of Electronics. Does anyone know if there is any sort of answer key available anywhere for the exercises? I'm not having trouble with any particular question, it would just be nice to check my work as I go through a few of the sections.

Keebler
Aug 21, 2000

ANIME AKBAR posted:

The book sometimes used as a primary textbook in classes, so I doubt you'll be able to find complete answer keys. I've never really looked at their problem sets before (though their good/bad circuit exercises are pretty great and entertaining).

..

Nothing in AoE is really irrelevant, except when it talks about specific components which are likely obsolete now. For general circuit theory, it's still the best. Anything more sophisticated is going to be dedicated to some specific subject, unlike AoE.

Thats kind of what I figured. I was mainly after a book that could provide a breadth of information as well as serve as a reference. My background is in CS so I'm still lacking in a few areas. Being able to play around with the exercises would have just been icing on the cake.

Keebler
Aug 21, 2000

catbread.jpg posted:

My first PIC project is up and running (well, programmable/debuggable). DSPIC33F running at 40 MIPS. It's for my inverter control project. Using the ICD 2.

I got the board milled, it came out really nice. Still waiting on an FTDI USB chip which will sit in the bottom left.

Nice!

Where did you get your board milled and what did it cost? I just used bactchPCB for the first time and while I like their prices having to wait a month to get the board was terrible.

Keebler
Aug 21, 2000

Scarboy posted:

I'm doing some prototyping right now and making all my connections with female headers and no connectors (wire in hole). This is the most painful thing I've ever done in my life. What kind of connectors can I get (need 2pin, 4pin, 15pin, 16pin) to mate with female headers or male headers (I'd rather use male headers on my boards because then I can just buy 100 pin breakaways). I've looked all over digikey/mouser but their connector sections are full of confusing products that don't look like what I need.

I guess what I'd like to buy is something like this, but I don't know what parts to get (are the assembly/pins separate?) or what tool I need to crimp the connections.

I haven't found a good solution to that yet either. What I usually end up doing is getting a roll of flat ribbon cable and buying those rectangular press together ends for them. They come in different sizes and for the board side (usually the male end) you can get solder or wire wrap termination.

Keebler
Aug 21, 2000
Alright, I think I may have made a rookie mistake here...

I have an ATMega8535-16PU that I'm setting up to use serial communication with. I stuck it in my programmer last night and set the fuses to use an external crystal:

avrdude -p atmega8535 -P lpt1 -c dapa -u -U lfuse:w:0xef:m

That command went through without any issue. Now however I cannot communicate with the chip at all to program it, I can't change the fuses either. I'm using a simple parallel port programmer. Did I do something wrong or now that the fuses are set does my programmer need to have an external crystal to program the chip? I know the tool chain still works because I can put a second chip into the programmer and program it without issue (without blowing any of the fuses though).

Keebler
Aug 21, 2000
That makes sense. I think I have a spare crystal or two I can dig out and clip on just to get it working. Thanks!

Keebler
Aug 21, 2000
So I've got a neat little project that I'm working on in my spare time and I was wondering if I could get some input on setting up glue logic. What I'm trying to do is interface a flash chip with an old NES along with a pair of SRAMs such that the NES loads it's program ROM data and graphics ROM data from the flash chip into the SRAM (program data in one, graphics in the other). This itself doesn't have much use but if I can get this working I hope to take this into some other directions.

The graphics data isn't a problem as it has it's own CPU and is on a separate bus. The program data is where I'm having an issue:

The CPU exposes a 16 bit address bus and a 8 bit data bus. On power up the program ROM in the cartridge is mapped into 0x8000-0xFFFF in the CPU's address space and execution begins at 0x8000.

I'm going to wire in my flash chip to 0x8000 so that is executes my code on power up. This code will copy itself into a tiny bit of unused internal memory available on the CPU and then proceed to copy data from the flash chip to the SRAM. When it's finished it will begin executing the program ROM now in the SRAM, this will also have to be located at 0x8000.

My problem is, the flash chip and SRAM both have to be mapped into the 0x8000 address space. I need a way to read from the flash, disable the flash and enable the SRAM, write to the SRAM and then disable the SRAM and re-enable the flash and start the process over again. When everything is copied I need to permanently disable the flash/enable the SRAM until power down while leaving the CPU's address space unchanged.

I think I've got everything worked out except for one detail. I'm going to borrow the 0x6000-0x7FFF address space which I know to be unused by the CPU while I'm doing my copying. Whenever an address in that space is placed on the address bus, I'll latch the current value of D0 which will determine the /CE lines for my flash and SRAM (one will be inverted). I figure I can do this with a pair of inverters, a latch and an AND gate (!A15 && A14 && A13 = latch D0). My problem is that after my copy is finished how do I permanently disable the flash and enable the SRAM? The CPU will need the 0x6000-0x7FFF range back so I can't simply rely on no more data being written there to maintain the value of the latch.

Sorry for the massive background for one little question.

Keebler
Aug 21, 2000

catbread.jpg posted:

Would you be able to post a diagram of the physical connection of the hardware?

I think one solution might lie with the use of more data pins (and an appropriate section in the software) to encode a value which sets up another latch (with power reset logic), that overrides the first latch through more logic (OR, before going to your /CE inverter section).

I think that will work just fine, thanks!

I dusted off my digital logic book and it looks like if I add a second SR latch with it's reset tied to ground, input tied to the second data pin and output put in OR with the input to the second latch, it will act as a one shot. Once it's set it will always force the second latch to 1 enabling SRAM until a power cycle.

All my notes are in my notebook right now and I don't have a scanner but if you want to get an idea of what I'm working with you can view the CPU/PPU and memory schematic here (not shown is the power and video circuitry):



I'm hooking into the cart connector shown in the upper right. PRG refers to the program ROM and CHR the graphics ROM. CIRAM is the internal 2k RAM tied directly to the PPU. The CPU also has 2k internal but it's /CE signal is not exposed on the cart connector.

quote:

Why does the NES need to copy the data out of flash and into SRAM? You could use a small microcontroller to look at the address lines and move data around as needed. This would probably be the same price as buying some logic gates if you want DIP chips. IIRC some larger NES games had special memory mapping chips to do just this.

That's the other way to do it. My ultimate goal is to have ROM's loaded off a compact flash cartridge via a menu system. Other people have done this so I'm basically reinventing the wheel but it's a great project for me since it covers a lot of things that I've wanted to learn about.

I did think about using a micro controller but I thought it would be more elegant to have the NES CPU do all the work (plus I know it's possible as someone else managed to pull it off). The mappers themselves are a whole other beast. Any game worth playing uses a mapper. The only ones that don't are Super Maro Brothers, Excite Bike and a handful of single screen arcade conversions (Burgertime, Joust, etc). I initially toyed around with using a micro controller to simulate the mappers through software emulation. Ultimately I decided to use a FPGA instead, mostly because my experience with them is very limited and I wanted to learn more. It also potentially could do away with some of the inaccuracies I hear exist with software emulation of the mappers.

Keebler
Aug 21, 2000

Hillridge posted:

On a completely unrelated note, does anyone know where I can find details on the old NES hardware? I remember someone asking an NES question a while back.

That was me. I'm slowly moving forward on the project, got the hardware prototype done, just working on software.

There is a ton of information though it's scattered around on a number of websites and is of varying quality.

http://nesdev.parodius.com/
http://www.zophar.net/documents/nes.html
http://nesdev.parodius.com/bbs/index.php <-- Very active web forum
http://www.raphnet.net/electronique/nes_mod/nes_mod_en.php

That should get you started. I've saved a lot of the good docs to my computer so I wouldn't have to find them again whenever I needed the reference, is there something specific you're trying to find?

Keebler
Aug 21, 2000

Mill Town posted:

Help me goons! I'm hooking up to an old piece of equipment from 1979 that expects your grandpa's RS232. I need a really beefy RS232 level converter. The CMOS-level side needs to be 3.3v compatible, and the RS232-level side needs to supply at least +/- 10v at a few milliamps. All of the Maxim ICs I've seen so far have been "EIA standard" +/- 5v or 6v, which is way too low for my application.

The old "True RS232" chip numbers are 1488 and 1489, the driver and transmitter are separate chips and require a bigger supply then the RS232 compatible chips. Maxim (and I'd imagine other companies like Intersil) do still make pin compatible versions of these. Maxim's is the MAX1488E and MAX1489E:

http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1022

Digikey sells them for around $3 each in DIP form:

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=MAX1488EEPD%2B-ND

Keebler fucked around with this message at 19:42 on Oct 27, 2009

Keebler
Aug 21, 2000

Zuph posted:

Definitely won't be filling the bottles with already carbed beer. Foam is going to be a concern, but I hope to be able to modulate flow rate so this isn't a problem. Also, after years of homebrewing, I'm not at all convinced that casual oxidation has any tremendous effect on a batch, of all the things that can't be controlled for in a homebrew situation, and even less convinced that the small drop into a 12 oz bottle is going to have any effect at all, let alone something readily detectable. I'm receptive to objective evidence to the contrary, but I've never read or experienced anything convincing.

I really like the removable frame idea.

A simple sensing setup could be done with two diffuse stick sensors like these:

http://www.automationdirect.com/adc...SS-z-FA_Series)

Looking down on your filling rig, place one sensor north of the nozzle and one east of it. For your purposes the speed that the nozzle moves, it's acceleration and its stopping time are all constant (any case of bottles it going to be really close in dimension to any other). Start moving north, when the sensor picks up the leading lip of a bottle, either stop immediately or start a timer and stop after X ms. You could adjust where the nozzle stops in relation to the center of the bottle by adjusting the timer and the distance from the nozzle that the north sensor is at. Start moving north again. Depending on where that north sensor is positioned, you will either have to ignore the first reading when you start to move or ignore the second reading as you're stopping (that's the trailing lip of the same bottle).

Count how many bottles you're filling. When you reach the end of a row, move east one column using the same technique and then retract the nozzle all the way back to the beginning row. Start the north filling sequence over again. Repeat until everything is full.

You could make it faster by adding a third sensor south of the nozzle, then you could fill in the south direction rather then having to retract after each row.

If you go with diffuse sensors, make sure that you get a sample to experiment with first. I've used them on a range of surfaces before but never colored glass.

Keebler fucked around with this message at 19:35 on Nov 19, 2009

Keebler
Aug 21, 2000
Does anyone have any recommendations on logic analyzers? I'm at a point on a project where I both need and can finally afford one (project was shelved while I was unemployed :( ). The one that stands out and seems to be getting the most press these days is:

http://www.saleae.com/logic/

It's priced right but I'm a little put off by the max speed, it has no internal buffer and is bound by the USB port speed (though it's fine for what I need right now). Are there any other alternatives that I should be looking at? I'm looking to spend around $250 or less.

Keebler
Aug 21, 2000

Walking Spanish posted:

Alright electrical goons, here's my situation and I'm hoping you can help me with this. I recently purchased an industrial sewing machine head for around 500 dollars. The problem is that it is not sold with the motor or table. The table I can build but the motor is my primary concern. Here it is:

Now, I was thinking of yanking the motor out of a washing machine and modifying it so that it will run my sewing machine. The motor pictured there is selling for around 500-600 dollars and I ain't gonna pay that for a simple motor like that.

What would be my best course of action as in picking a motor? Perhaps a bench grinder? My other problem is I don't know jack about hooking up servos motors so I can adjust the speed. So now I open it up to you for advice.

You don't need a servo motor, just an AC motor with a speed control. A quick search on Ebay shows tons of sewing machine motors under $20. Then you just need to find a pedal (Ebay, once again, has a ton of decently priced ones). Or if you're feeling really cheap, hit up harbor freight:

http://www.harborfreight.com/router-speed-control-43060.html

Keebler
Aug 21, 2000
Does anyone have any good places online to purchase wires with female terminals pre-crimped onto an end? Something where I could take like 10 of them and snap them into a plastic 2x5 connector to hook onto a pc board header.

I've found these:

http://www.pololu.com/catalog/category/71

But they're 2.54mm pitch and I'm looking for 2.0mm

Keebler
Aug 21, 2000
That's the reason I was looking for pre-crimped wires too, all the crimping tools that I could find were too expensive considering the amount of use I expected to get out of them.

Adbot
ADBOT LOVES YOU

Keebler
Aug 21, 2000
My only experience is with AVRs, not PICs but I believe you probably need to put GP2 into output mode:

quote:

On Reset, all I/O ports are defined as input (inputs are at high-impedance) since the I/O control registers are all set.

I think you need to do this through the TRISGPIO register.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply