Jump to content

Inverse reaction on DOUT and DIN possible?


novski

Recommended Posts

Is there a possibility to let the DIN and/or the DOUT react inverse? 

 

Background:

Usual DOUT LED is lit by switching HIGH on the Output O0-7 of the HC595 Shiftregister. I wold need a possibility to switch to LOW so i can inverse the Polarity and Connect the Cathode towards the Shiftregister and the Anode to the 5V supply. 

 

And the same for DIN. Connecting the Resistor Network to GND and switching the Supply "VD" towards the Inputs I0-7 of the HC165 Shiftregister wold inverse the reaction.

 

So it wold be nice to have a possibility to inverse the reactions in Software... is that possible in some way?

 

Thanks

novski

Link to comment
Share on other sites

For the buttons you could modify the standard hook to only check for releases and skip the button presses. Instead of this

void APP_DIN_NotifyToggle(u32 pin, u32 pin_value)
{
  // only check for button presses and skip releases
  if (pin_value == 0x01)
	return;

  switch (pin) {
....

you would then write something like

void APP_DIN_NotifyToggle(u32 pin, u32 pin_value)
{
  // only check for releases and skip button presses
  if (pin_value == 0x00)
	return;

  switch (pin) {
....

The same could probably be done for the LEDs, just set the DOUT state to be 1 for all outputs, e.g. during the init phase, and then switch to 0 individually if needed.

Link to comment
Share on other sites

AH. OK. Thanks Ilmenator.

I hoped it wold give a easy MIOS File browser way.. But i will set up the toolchain and try that. (i recently had to change my Mac and since that wonderful NG with Filebrowser is working so fine i didn't needed it until now..)  :phone:

Link to comment
Share on other sites

I just thought about the ability to stay in the usual NG app system and to stay easy upgradeable..

It wold be nice if there wold be a way to change the Hardware instead of the Software...

 

Is a shift register always the same or is there a possibility to find a register that works inverse?

Link to comment
Share on other sites

Since you are driving LED's, and if you are using the Dout board from SmashTV, you can just remove the resistor networks and insert the uln2803 darlington driver chip. It will invert the signal for you. This link show how to insert the new IC's. http://mbhp.avishowtech.com/mbhp_doutR5.html

You will have to put external resistors in series with the LED's.

 

As far as inverting the inputs, maybe TK already has a solution for you. I don't know for sure but I believe I saw this added to Midio128 about a few months ago.

 

Another hardware solution might be to just insert 1 inverter in series with each SO and SI serial data lines going to/from your core processor.  I would vote for the software solution but thats because software doesn't intimidate me.

 

Pete

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...
×
×
  • Create New...