wickedblade
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
wickedblade [2009/10/15 08:48] – WickedBlade | wickedblade [2010/05/17 16:32] – wickedblade | ||
---|---|---|---|
Line 170: | Line 170: | ||
But this is the maximum continuous current draw, we have to take the pikes into account too. I've been told that aiming at 2A is a good choice, so I'll try to do that. | But this is the maximum continuous current draw, we have to take the pikes into account too. I've been told that aiming at 2A is a good choice, so I'll try to do that. | ||
- | I originally | + | As far as voltage is concerned, the PIC and associated ICs need 5V, the relays need 5V too, but for the input/ |
- | Since then, I found a 5V 2A power supply (PETERSON POWER SUPPLY 5V 2A at Thomann), which is significantly more expensive, but ensures that I won't have power supply problems. Also, the 5V input voltage means that the 7805 won't heat much, I think. | + | |
- | + | ||
- | I also found a 9V 2A unit: THOMANN NT 092A, similarly priced. | + | |
- | + | ||
- | I thought for a time that I could forget about these power supply units: the Sony PSP portable console uses a 5V 2A power supply, so that means that there are many that are readily available in video game stores, | + | |
It appears to me that I need to manage 2 separate grounds for analog signal and digital signal. I don't quite know how to do that. I've been told I could put some kind of low pass filter somewhere, but I don't quite know how and where. I believe this should go between the digital and analog grounds, so that the analog ground gets a filtered version of the digital ground, but how should I go about it? | It appears to me that I need to manage 2 separate grounds for analog signal and digital signal. I don't quite know how to do that. I've been told I could put some kind of low pass filter somewhere, but I don't quite know how and where. I believe this should go between the digital and analog grounds, so that the analog ground gets a filtered version of the digital ground, but how should I go about it? | ||
Line 227: | Line 222: | ||
* a linear regulator (LM7805 or L78S05) | * a linear regulator (LM7805 or L78S05) | ||
- | For the input and output buffers, I chose the OPA134PA | + | For the input and output buffers, I chose the OPA2134 |
Here's the partlist for one buffer: | Here's the partlist for one buffer: | ||
- | * 1x OPA134PA or 1xOPA2134PA | + | * 1x OPA2134PA (half of it actually) |
* 1x DIP8 socket | * 1x DIP8 socket | ||
* 3x 100k metal film resistors | * 3x 100k metal film resistors | ||
Line 237: | Line 232: | ||
* 2x 10µF electrolytic capacitors | * 2x 10µF electrolytic capacitors | ||
- | Note that I have to double the quantities because I want 2 buffers. Again, more information can be found on [[http:// | + | Note that I have to double the quantities because I want 2 buffers |
- | For channel switching I originally thought about using a CD4053 like geofex does, but it needs a -5V input besides the +5V and ground. And I don't have that. It doesn' | + | For channel switching I have considered |
- | Here's a topic I opened on the forum on this matter: [[http:// | + | Another option is the "solid state relays", |
- | + | ||
- | I'm now turning my hopes to the "solid state relays", | + | |
From the Fender Hot Rod Deluxe schematics, I gather that to drive the " | From the Fender Hot Rod Deluxe schematics, I gather that to drive the " | ||
Line 248: | Line 241: | ||
* 2 47ohms 1/4W 5% resistors | * 2 47ohms 1/4W 5% resistors | ||
* 2 22uF/25V electrolytic caps | * 2 22uF/25V electrolytic caps | ||
- | The schematics can be found easily on the net. Amps differ widely as far as channel switching is concerned, so better check the schematics to match your amp! | + | The schematics can be found easily on the net. Amps differ widely as far as channel switching is concerned, so you' |
==== Loops wiring ==== | ==== Loops wiring ==== | ||
Line 266: | Line 259: | ||
* The SDCC compiler doesn' | * The SDCC compiler doesn' | ||
* PIC limitations mean that you can't declare variables that use more than 256 bytes in RAM. This is the cause of the unintelligible linker error message "no target memory available for < | * PIC limitations mean that you can't declare variables that use more than 256 bytes in RAM. This is the cause of the unintelligible linker error message "no target memory available for < | ||
- | * Compiling for the 18f4620 makes the linker output warnings about unrecognized PIC and using the generic PIC18cxx type. The warnings are apparently considered ok to ignore. I personally don't think warnings are ok in any from, but hey, I'm not coding the gputils or SDCC... | + | * Compiling for the 18f4620 makes the linker output warnings about unrecognized PIC and using the generic PIC18cxx type. The warnings are apparently considered ok to ignore. I personally don't think warnings are ok in any from (and I fixed them, search the forum), but hey, I'm not coding the gputils or SDCC... |
* Code:: | * Code:: | ||
* It's often better to use a lot of //if// statements than //switch// statements, because the latter have a non-negligible overhead. Also, it is often much more efficient (memory-wise as well as performance wise) to use arrays where applicable. | * It's often better to use a lot of //if// statements than //switch// statements, because the latter have a non-negligible overhead. Also, it is often much more efficient (memory-wise as well as performance wise) to use arrays where applicable. | ||
* Because of the banked structure of memory in the PIC, you should take special care where you put your data to avoid unnecessary BANKSEL instructions (these are the one that select a particular bank in assembly language). Similarly, I found that it's often better to work on a local copy (into a local variable) of a volatile global variable, than using it repeatedly: the compiler has no way of knowing if an interrupt routine has modified it and will read it back too often, including using BANKSEL instructions. Remember that declaring a local variable doesn' | * Because of the banked structure of memory in the PIC, you should take special care where you put your data to avoid unnecessary BANKSEL instructions (these are the one that select a particular bank in assembly language). Similarly, I found that it's often better to work on a local copy (into a local variable) of a volatile global variable, than using it repeatedly: the compiler has no way of knowing if an interrupt routine has modified it and will read it back too often, including using BANKSEL instructions. Remember that declaring a local variable doesn' | ||
+ | * The optocoupler in the CORE module (a 6N138) is a fragile thing, so buy a few spares, just in case | ||
+ | * For use as a computer MIDI interface, you really need either a gameport MIDI cable (if you motherboard has a gameport) or a USB MIDI cable. I now know for a fact that my Line6 PODxt and my Boss DR-880 can't be trusted, even though they sport USB and MIDI outputs. The PODxt filters out SysEx messages and I couldn' | ||
+ | * Noise! It turns out that having the DOUT modules chained is a recipe for noise. Specifically 1kHz noise (if that's the frequency to which you set the shift registers refresh). After a hard time investigating, | ||
+ | * The documentation about MIOS_BANKSTICK functions is unclear about that, but it seems that if you want to use the page reading/ | ||
+ | * I would have dearly loved to know about the watchdog timer (WDT) before, that would have helped me understand why my app kept rebooting while it was trying to initialize the banksticks! Days on debugging have been wasted on this :( | ||
+ | |||
+ | |||
+ |
wickedblade.txt · Last modified: 2011/11/29 14:40 by smashtv