Jump to content

MIDI controlled tube guitar amplifier


_frank
 Share

Recommended Posts

Hi there,

I just build the MBHP_CORE_LPC17 board. I want to make a proto of a MIDI controlled guitar tube amplifier and/or WAH padel/compressor. Maybe I first start with something simple.

HW:

LPC1769 board

I2C for controlling the tube amp

Matrix Orbital UART graphical display with key (GLK19264-7T-1U-WB)

I have the MIOS toolchain running.

I would like to use Mios Studio and USB i/f to monitor received MIDI in1 messages & sending MIDI messages to the guitar amp.

I am quite HW oriented; I have some SW questions how to go further.

Which MIOS32 application do you suggest to include I2C functionallity?

Are there any MIOS32 examples with I2C?

Is there an example with UART i/f to the display?

Is there an example with UART i/f from a keypad?

Is there an example that shows how to parse the MIDI messages and trigger an I2C command?

Any suggestions how to get the I2c/UART code running in MIOS32

Thanks,

Frank

Link to comment
Share on other sites

I don't have a concrete answer, but I don't think it would be too difficult to do. Curious what comes of this as it could be handy for other pursuits as well! I've been thinking about making a MIDI sync'ed delay pedal, for instance (though the thing to do the actual delay I haven't figured out, unless I make Ableton Live an effect box, which I wanted to try and avoid for live shows).

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

I now can send strings and commands to the UART display. But there seems to be some a TX fifo overflow. The display is default 19200 baud, I want to use it at 115200 baud. Once the display is set to 115200 baud the setting is remembered next time it is powered.

So I would like to use MIOS32 (with LPC1769)to start with 19200 baud and switch over to 115200 after sending a command to the display to run at 115200. It seems that the function

MIOS32_UART_BaudrateSet(UART1,115200);

doesn't do anything. I can continue to send message to the display set at 19200.

Is the stuff of the errata sheet implemented in MIOS32?

http://www.nxp.com/documents/errata_sheet/ES_LPC176X.pdf

By the way, the errata sheet was updated januari 2012. Some ADC and GPIO stuff has been added.

I now have put next code in, but I think disabling / enabling the PLL at this time is too late. The target does not respond anymore via Mios Studio.

void APP_Init(void)

{

MIOS32_COM_SendBuffer(UART1,(u8 *)DISPL_MO_baud_rate_115200,(u16) sizeof(DISPL_MO_baud_rate_115200));

MIOS32_UART_BaudrateSet(UART1,115200);

LPC_SC->PLL0CON = 0x00;

LPC_SC->PLL0FEED = 0xAA;

LPC_SC->PLL0FEED = 0x55;

LPC_SC->PLL0CON = 0x03;

Any idea where I can place the PLL toggle to change UART baud rate?

Best regards,

Frank

Link to comment
Share on other sites

Hi,

I solved the problem. I can now switch the UART speed with the LPC1769 in the App_Init function. But I advice to check the errata sheet and update MIOS32 accordingly.

MIOS32_COM_SendBuffer(UART1,(u8 *)DISPL_MO_baud_rate_115200,(u16) sizeof(DISPL_MO_baud_rate_115200));

MIOS32_UART_BaudrateSet(UART1,115200);

LPC_SC->PLL0CON = 0x00;

LPC_SC->PLL0FEED = 0xAA;

LPC_SC->PLL0FEED = 0x55;

LPC_SC->PLL0CON = 0x03;

LPC_SC->PLL0FEED = 0xAA;

LPC_SC->PLL0FEED = 0x55;

I forgot the second feed to program the PLLCON0 shadow registers.

Anyway the PPL0 toggle is not im MIOS32, it should be.

Best regards,

Frank

Link to comment
Share on other sites

I recall not having luck to change the baudrate with

MIOS32_UART_BaudrateSet(..)

However using a

#define MIOS32_UART2_BAUDRATE 115200

definitely works. (I was using UART2.)

Take the time to study all of the tutorial code as well as having a good look at the apps in the repository. It is very likely every different step you need is demonstrated somewhere.

Its a great way to learn how to code really well as the quality of the stuff in the repo is almost always top notch IMHO.

A midi controlled valve amp is not so difficult sw project to implement.

However, the hardware aspect, due to the high signal gain you'll want, noise crossing over from the digital side is a real challenge!

One approach is to completely optically isolate the digital control from the analog signal path. A way of doing this is to drive an LED with analog brightness using PWM which is optically coupled to a light dependent resistor. DC voltages used for example to set up bias voltages around the valve stage for example, you can use a standard optoisolator again driven with PWM from the digital side, and the analog DC reconstructed (lpf) on the valve side.

In other words I believe if you just control the signals with I2C digi pots connected to the valve circuitry, you'll have disappointing results, noise wise.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...