Jump to content

sparx

Programmer
  • Posts

    228
  • Joined

  • Last visited

Everything posted by sparx

  1. Hi Peter Yes I've seen that, not had much chance to play about with it yet, doesn't the SD card have to be formatted in FAT? I was thinking more along the lines of a Soundchip, such as SID, based synth. Any help on the 595 noise is still requested! Thanks Sparx
  2. Hello all I'm trying to drive a YM3526 chip with the LPC core. Software is all fine, I've tested my interface with LEDs so I know that's good. The program waits for a button to be pressed,then sends a series of numbers to 2 DOuts and a Tone should be heard through a loudspeaker. I've tried doing this with a load of switches and it works fine. When I use the core and the software, the moment the 595's in the DOut start changing value, noise is heard which doesn't stop. The test tone is there but very faint. Obvious thing to check is the power supply (USB powered), tried that, even using a battery, but its still the same. Anyone got any suggestions what else to try? Whilst I'm here anyone else working on a new synth/sound generating device with the new core? Thanks Sparx
  3. Kristal Is any soldering required for the Swinsid nano or does it come already built? Is it stereo or mono output?
  4. I've messed about with it. Compiled OK and from what I remember, everything was configurable via the LCD and control surface. Do recall I couldn't get any output from the standard MIDI port, USB worked fine, yes I changed the mios32_config.h file. Then got sidetracked doing other things. The LCD isn't anything to worry too much about.
  5. Thanks for the replies. What I was trying to do was to use J19 for DOuts. J8/J9 are practically full in the configuration I'm using, so was trying to find another way to get DOUTs. Regards S
  6. Have been attempting to get a DOut x 2 working on J19, have read the documentation and tried the examples, but its not behaving how I would expect it to. What I need it to do is to get a value from an encoder position, which will be 4 bits and put this out to the 595’s. Ultimately it will be two encoders, 4 bits each, making up a byte. At the moment, the value is shifted left 9 places and is set to count to 255, however after it gets to 64, incorrect values are displayed on the 595 output. Its being initialised like this: // initialize AOUT module AOUT_Init(0); // configure interface // see AOUT module documentation for available interfaces and options aout_config_t config; config = AOUT_ConfigGet(); config.if_type = AOUT_IF_74HC595; config.if_option = 0xffffffff; config.num_channels = 8; // INTDAC: only 2 channels supported, 8 channels pre-configured for your own comfort config.chn_inverted = 0; AOUT_ConfigSet(config); AOUT_IF_Init(0); And sent to the 595’s on J19 like this: AOUT_PinSet(1,value<<9); AOUT_Update(); Can anyone see what is going wrong? Thanks all Regards S
  7. Thank you, thank you. Got that going. No doubt I will be back with more questions... Thanks again.
  8. Like this: Thanks again. // $Id: app.c 690 2009-08-04 22:49:33Z tk $ /* * MIOS32 Application Template * * ========================================================================== * * Copyright (C) <year> <your name> (<your email address>) * Licensed for personal non-commercial use only. * All other rights reserved. * * ========================================================================== */ ///////////////////////////////////////////////////////////////////////////// // Include files ///////////////////////////////////////////////////////////////////////////// #include <mios32.h> #include "app.h" #include <aout.h> #include "mios32_enc.h" #define NUM_ENCODERS 8 MIOS_ENC_TABLE { // sr pin mode MIOS_ENC_ENTRY( 6, 0, DETENTED2), // MIOS_ENC_ENTRY( 6, 2, DETENTED2), // MIOS_ENC_ENTRY( 6, 4, DETENTED2), // MIOS_ENC_ENTRY( 6, 6, DETENTED2), // MIOS_ENC_ENTRY( 7, 0, DETENTED2), // MIOS_ENC_ENTRY( 7, 2, DETENTED2), // MIOS_ENC_ENTRY( 7, 4, DETENTED2), // MIOS_ENC_ENTRY( 7, 6, DETENTED2), // MIOS_ENC_EOT }; u8 enc_virtual_pos[NUM_ENCODERS]; ///////////////////////////////////////////////////////////////////////////// // This hook is called after startup to initialize the application ///////////////////////////////////////////////////////////////////////////// void APP_Init(void) { // initialize all LEDs MIOS32_BOARD_LED_Init(0xffffffff); } ///////////////////////////////////////////////////////////////////////////// // This task is running endless in background ///////////////////////////////////////////////////////////////////////////// void APP_Background(void) { // endless loop while( 1 ) { // toggle the state of all LEDs (allows to measure the execution speed with a scope) MIOS32_BOARD_LED_Set(0xffffffff, ~MIOS32_BOARD_LED_Get()); } } ///////////////////////////////////////////////////////////////////////////// // This hook is called when a MIDI package has been received ///////////////////////////////////////////////////////////////////////////// void APP_MIDI_NotifyPackage(mios32_midi_port_t port, mios32_midi_package_t midi_package) { } ///////////////////////////////////////////////////////////////////////////// // This hook is called before the shift register chain is scanned ///////////////////////////////////////////////////////////////////////////// void APP_SRIO_ServicePrepare(void) { } ///////////////////////////////////////////////////////////////////////////// // This hook is called after the shift register chain has been scanned ///////////////////////////////////////////////////////////////////////////// void APP_SRIO_ServiceFinish(void) { } ///////////////////////////////////////////////////////////////////////////// // This hook is called when a button has been toggled // pin_value is 1 when button released, and 0 when button pressed ///////////////////////////////////////////////////////////////////////////// void APP_DIN_NotifyToggle(u32 pin, u32 pin_value) } My button code goes here.... } ///////////////////////////////////////////////////////////////////////////// // This hook is called when an encoder has been moved // incrementer is positive when encoder has been turned clockwise, else // it is negative ///////////////////////////////////////////////////////////////////////////// void APP_ENC_NotifyChange(u32 encoder, s32 incrementer) { // toggle Status LED on each AIN value change MIOS32_BOARD_LED_Set(1, ~MIOS32_BOARD_LED_Get()); // increment to virtual position and ensure that the value is in range 0..127 int value = enc_virtual_pos[encoder] + incrementer; if( value < 0 ) value = 0; else if( value > 127 ) value = 127; // only send if value has changed if( enc_virtual_pos[encoder] != value ) { // store new value enc_virtual_pos[encoder] = value; // send event MIOS32_MIDI_SendCC(DEFAULT, Chn1, 0x10 + encoder, value); } } ///////////////////////////////////////////////////////////////////////////// // This hook is called when a pot has been moved ///////////////////////////////////////////////////////////////////////////// void APP_AIN_NotifyChange(u32 pin, u32 pin_value) { }
  9. So I added some encoders to my setup, all was fine until I put the MIOS_ENC_TABLE in and now get this error: "expected '=', ',', ';', 'asm' or '__attribute__' before '{' token" I'm using the app_skeleton. Can anyone can tell me whats wrong? Thanks S
  10. Thanks for the replies. Just after posting, I realised that MIOS detects on and off, tried lots of things, but found that adding: if (pin_value==0){ break; as the first entry in the case statement did the trick. There are probably more elegant solutions to this, if any C gurus could suggest some it would be good. At the moment I am only trying to get a feel for what can be done and also remembering my C, which is coming back, slowly..... Thanks again. S
  11. Hi all Am trying to write some basic code to handle buttons, there are 41 in all, I'm starting with button 7. What I want it to do is to light an LED on a DOut when pushed first and if pushed again, put the LED out. Am using a long case statement, here is the code for button 7: case 7: if ( st40 == 0){ st40=1; MIOS32_DOUT_PinSet(40, 1); MIOS32_LCD_CursorSet(0, 2); // X, Y MIOS32_LCD_PrintFormattedString("Status %d",st40); MIOS32_LCD_CursorSet(0, 3); // X, Y MIOS32_LCD_PrintFormattedString("Button 7 pressed on "); } else if (st40 == 1){ st40=0; MIOS32_DOUT_PinSet(40,0); MIOS32_LCD_CursorSet(0, 2); // X, Y MIOS32_LCD_PrintFormattedString("Status %d",st40); MIOS32_LCD_CursorSet(0, 3); // X, Y MIOS32_LCD_PrintFormattedString("Button 7 pressed off"); } break; What happens is that the LED is lit only whilst the button is pressed, when released it goes off. Although sometimes it stays on forever.... Can't see whats wrong, so anyone got any ideas? Thanks S
  12. Are you hooking it up correctly? Double check that. Next thing to try is a different connector, I had one which seemed fine when checked with a multimeter, but didn't actually work in real life. I cut it off and threw it away, my hair grew back too....
  13. Go to: http://www.sdtb.de/Startseite.63.0.html a button pushers paradise, the best museum I have ever been to said Mrs Sparx and as always she was right, as always..... (Its the one with the plane on the top) There is a musical instrument museum in Potsdammer Platz, a really cool perspex piano amongst other exhibits. There was another large museum where they had giant robots in the main hall, but can't remember the name... If you want a different sort of hotel, try Propller Island:Cool Hotel, I spent the night in room 31 and yes I did, with the lid down! Also check out the Art Otel, Andy Warhol themed.
  14. Thats great, many thanks. What I'm trying to do is to drive an 8 bit chip, so 8 data lines and 3 control lines. Looking at the board and schematic, might it be better to use a couple of 595's into J19? Looks like a DIn could be connected there and the AOut commands used? What is the maximum number 595's that could be connected this way? Thanks again.
  15. Well have nearly finished setting things up with the LPC board. Now I need 11 output lines, where is the best place to take them from? J10 is being used by the control surface so J5 seemed obvious but can only find J5A and B, no J5C like in the examples. Anyone got any suggestions? Thanks S
  16. Thank you so much, that worked perfectly. Looks like lots more reading for me... S
  17. I'm playing about with some of the MIOS32 tutorials, currently looking at Tutorial #19 MIDI file player, seems that its sending lots of commands via the USB into MIOS Studio, but how do I change this so that the MIDI gets sent to the MIDI port? Thanks S
  18. OK, so I got the core loaded with the bootstrap and can compile the tutorials, but they seem to hang on the first screen, that is they say "Tutorial #xx" and thats it. Currently I have Tutorial 24 (the I2S synth) loaded on it and although it has compiled OK, it just hangs on the see readme.txt message. If the application was just loaded in via USB, I get the next scree saying LR, but if I power off and on again, it just hangs at the see readme.txt screen. Anyone got any ideas whats wrong? Thanks S
  19. First of all, replace the PIC. You could try burning the bootloader in, but it could possibly be dead. When you have a working PIC installed, try uploading code again. This will indicate if the opto has failed too. Are any of the electroltyic capacitors bulging? If they are, replace them, if not, you might be in luck. Good luck!
  20. Thank you!! All up and running now.
  21. Tried it on a different computer and the same thing. Only constant was the MIDI interface which has been used before with no problems. I'm stumped so do appreciate any help. Thanks again.
  22. Yes, it's XP. Have tried to power the core with both USB and external supply, same result. LED glows on LPC board so it seems to be getting the messages from MIOS Studio. Same result in BSL Hold mode. Any ideas? Thanks
  23. I've just finished building an LPC core board, installed the software, flashed the device etc. Start up MIOS Studio 2.2 and try to load an application in and it stops, sometimes at 13% other apps at 39%, whole thing fails after 16 retries. Anyone had this? Or any idea how to solve it? TIA S
  24. Only a solution if its a permanent fixture. But 0 ohm resistors are basically wire so not such a daft answer... You may have to search high and low for such a dip network, what about using 8 x DIP switches? Easily obtainable and removable if required? S
  25. The answer to that is it depends! Electrolytics are, in a very anoraky way, poor capacitors, sometimes these qualities are good things. Tantalums are "better" but are more expensive. Both are available in larger sizes. In general though, if a circuit needed a cap of say, 100nF, pretty much any 100nF capacitor can be used. Regards S
×
×
  • Create New...