Xbox AVIP break out board

Discussion about Modding the XBOX, including hardware and software hacks.
User avatar
professor_jonny
Posts: 1233
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 56 times
Been thanked: 174 times

Xbox AVIP break out board

Post by professor_jonny » Sun Mar 08, 2015 11:44 am

So some of you may know I have designed an adaptor to solder over the Xbox AVIP connector to give you breakouts of the video and audio signals using U.FL IPX RF conectors.

This project started as I have seen a few people dammage their xbox consoles by atempting vga and hdmi mods and this was a good solid solution and it is semi plug and play and will give you a reliable shielded impedance matched signals with plugs.

It also will buffer the internal h and vsync signals to 5v to give you proper vga compliant signals with a suitable bios that is.

This weekend I managed to get the use of a roland versacad vinal printer and draw to scale pictures of the circuitboard I made and lay it over the xbox console motherboad to verify it will all fit, sadly my measurments were a little bit out but I now know I have a final design that will fit all xbox versions.

I have also added some some breakout boards if you want to go that way, or some sort of internal adaptor or converter.

I have managed to find vertical toslink adaptor and vertical pcb mounting rca connectors of simular dimention so I can mount the board direct on the back of the xbox with a 10mm spacer as oposed to a right angle mount pcb sockets.

you will notice that the component board provides every signal via rca connectors to the back of the xbox and it has a gap on either side where i would suggest you could place something else there, Im still looking for a 3.5mm vertical socket 10mm high to power an external adaptor.

I have included bill of materials the program and all the various boards after verifying that they actually fit now :-)

Please see the rar file for more info or the instalation manual uploaded to google docs below:
https://docs.google.com/document/d/1ht7 ... sp=sharing

Of note the system is based around a PICAXE-14M2 (smd) for ease of a user to modify using a three wire serial connection (in circuit).
The picaxe system enables any one to reprogram it with not too much hassle, both flow chart and basic programs are provided as samples.

I thaught of combining an xirc into this as the m2 does virual multitasking and has a learing IR code library embeded and a small eprom to store IR codes it would just need to be connected to stand by power and a handfull of components to remote power on the xbox from an IR remote control, but hey ill leave that up to you guys to modify looking forward to seeing a version 2 from someone :-).

This project was done in eagle which is free to use and can be found here:

http://www.cadsoftusa.com/download-eagle/

edit updated project pcb to pass board verification and link to manual.
Xbox AVIP Mod.rar
(59.62 KiB) Downloaded 160 times
sound.jpg
vga.jpg
avip.jpg
edit update to program.
Attachments
component.jpg
Last edited by professor_jonny on Wed May 13, 2015 10:58 am, edited 5 times in total.

User avatar
nidge
Posts: 472
Joined: Fri Jul 27, 2012 8:29 pm
Location: Norfolk, United Kingdom
Has thanked: 24 times
Been thanked: 26 times
Contact:

Re: Xbox AVIP break out board

Post by nidge » Sun Mar 08, 2015 12:42 pm

Looking good :D
http://www.theoriginalxboxshoppe.weebly.com
http://www.ebid.net/uk/stores/Computers-and-Consoles


Crystal Xbox v1.4, Xecuter 3, 500gb sata hard disk, 1ghz CPU, 128mb RAM, HD component 720p, blue LED's.
Crystal Xbox v1.4, Xecuter 3, 320gb sata hard disk, stock CPU, 128mb RAM, HD component 720p.

User avatar
asbo
Posts: 594
Joined: Sun Jul 08, 2012 3:38 pm
Location: Norfolk, UK
Has thanked: 17 times
Been thanked: 54 times

Re: Xbox AVIP break out board

Post by asbo » Sun Mar 08, 2015 12:46 pm

How much would it cost to get a small batch of these made?
I don't have any need for one but I'd donate a few quid just to see them made and helping people :)

User avatar
xman
Posts: 1286
Joined: Wed Jul 04, 2012 2:30 pm
Location: Sydney, Australia
Has thanked: 55 times
Been thanked: 167 times

Re: Xbox AVIP break out board

Post by xman » Sun Mar 08, 2015 2:22 pm

Nice work P.J.. Have you got a prototype running yet?. It is something I could use a couple of when and if you have a finished, ready to fit unit. I think it would make a strong selling point and I have a few to sell aye. ;) I'll take the 1st download. I am quite interested in what you are doing here with this one and I like a nice PC board layout. :D

User avatar
professor_jonny
Posts: 1233
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 56 times
Been thanked: 174 times

Re: Xbox AVIP break out board

Post by professor_jonny » Sun Mar 08, 2015 9:39 pm

Next thing is to get some boards made I have all the parts except for the toslink and rca connectors but I guess most users would tend to want to mount a component to hdmi adaptor internal rather than the break out boards.

The break out boards are single layer so can easily be made at home, so I will focus on making up the avip boards, as somone can drill and fit pannel mounting rca connectors on the back or solder them to a hdmi adaptor them selves, and I see it being more used for that anyway, as tv's tend away from component input.

I have micros to make 20 boards so I'm looking to get a batch made in the next few weeks the dimentions are 65mm * 20mm so it will be 3.30 usd ber board cheap enough really, but at 250 it works out to be 2.50 usd each from pcbway (I did a quick quote on their web site.)

I expect it to cost 15-20 usd + shipping all built and programmed at the prices i got the micros for if I assemble them my self in batches of 20 and I think that is a resonable price, and if I can get the micros in large amounts with volume discounts I could expect a price of 10-15 usd at a guess.

So I don't think cost will be too much of an issue :-)

I plan to give a few away for users to test but that will be a bit of time before that happens as china is getting on with their back log from they new year.

User avatar
professor_jonny
Posts: 1233
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 56 times
Been thanked: 174 times

Re: Xbox AVIP break out board

Post by professor_jonny » Mon Mar 09, 2015 5:46 am

Some pictures fitted circuit board and proposed locations of break out boards.
avip.jpg
component.jpg
vga.jpg

Geeba
Posts: 531
Joined: Wed Jul 04, 2012 11:32 am
Location: UK
Has thanked: 59 times
Been thanked: 31 times

Re: Xbox AVIP break out board

Post by Geeba » Mon Mar 09, 2015 11:54 am

Top stuff!

I was just looking into a fixed component output on my xbox.... :)

User avatar
professor_jonny
Posts: 1233
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 56 times
Been thanked: 174 times

Re: Xbox AVIP break out board

Post by professor_jonny » Sat Mar 14, 2015 11:16 am

Here is a link to the beta version of the installer manual on google docs.

https://docs.google.com/document/d/1ht7 ... sp=sharing

I have also done minor modifications to the board layout as it failed verification because of the routing cabibilities and because of the trace widths for the polygon layer was too large to upload to pcb manufacturing site.

link replaced on initial page

User avatar
professor_jonny
Posts: 1233
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 56 times
Been thanked: 174 times

Re: Xbox AVIP break out board

Post by professor_jonny » Wed Mar 18, 2015 12:47 pm

so I have had some more developments I had the circuit boards made and they will be on the way to me in a few days.

After getting the board design they re quoted me a different price from the quote system and it works out 50 us cents board each way cheaper than what I was expecting.

I have also been talking to Wellshow Precision and they can manufacture the ufl cables 15cm long with plugs on either end and pricing is not too bad I guess:

100 for 1.89 usd each (~13usd per board)
250 for 1.035 usd each (~8usd per board)
500 for 0.875 usd each (~6usd per board)

The only problem is that the plugs are 50ohm impedance but the short distance, I dont see it being a problem as rca connectors on the end of component cables are not true 75 on impedance so it should be ok as they were designed to attatch a phonograph to amp back in the day.

I did find h.fl plugs that are 75 ohm compatable but they are so expencive it is not an option to consider and it would require a minor pcb change.

So that makes my estimate of somewhere around 12-25 usd with the main avip board setup with the cables ready to go depending on how much money the minister of finance will let me have :-).

So I'm just waiting for the boards to test now and I have scavanged ufl tails off some old laptops I have lying around for testing.
I intent to connect it to a hdmi converter board I have here and I will let you know more when I get it all operational.

Would people consider a kit set option you build it and I supply all the parts with a pre programed micro or no micro for a manual version if they so wish?

Of note the board has 7 0402 smd components on it that are 1mm long .5mm wide and will require a fine tip iron and a steady hand!!!!

User avatar
spicemuseum
Posts: 906
Joined: Mon Jul 09, 2012 11:08 pm
Has thanked: 94 times
Been thanked: 75 times

Re: Xbox AVIP break out board

Post by spicemuseum » Wed Mar 18, 2015 2:42 pm

professor_jonny wrote:Would people consider a kit set option; you build it and I supply all the parts with a pre programed micro or no micro for a manual version if they so wish?
Yep.
professor_jonny wrote:Of note; the board has 7 0402 smd components on it that are 1mm long .5mm wide and will require a fine tip iron and a steady hand!!!!
Oh. :-( Time to break out the magicifying glass and tweezers.

User avatar
spicemuseum
Posts: 906
Joined: Mon Jul 09, 2012 11:08 pm
Has thanked: 94 times
Been thanked: 75 times

Re: Xbox AVIP break out board

Post by spicemuseum » Wed Mar 18, 2015 3:01 pm

professor_jonny wrote:Here is a link to the beta version of the installer manual on google docs.

https://docs.google.com/document/d/1ht7 ... sp=sharing

I have also done minor modifications to the board layout as it failed verification because of the routing cabibilities and because of the trace widths for the polygon layer was too large to upload to pcb manufacturing site.

link replaced on initial page
Jonny, I proof-read your document and fixed a few spelling, punctuation, typo and grammatical mistakes. I hope the updates are visible to you, I'm not so familiar with Googledocs (and I'll forgive your American English spelling of some words (with zeds instead of esses :-) ):
https://docs.google.com/document/d/1ht7 ... sp=sharing

psyko_chewbacca
Posts: 213
Joined: Fri Oct 05, 2012 5:19 pm
Location: Québec, Canada
Has thanked: 21 times
Been thanked: 125 times

Re: Xbox AVIP break out board

Post by psyko_chewbacca » Wed Mar 18, 2015 5:24 pm

professor_jonny wrote: Would people consider a kit set option you build it and I supply all the parts with a pre programed micro or no micro for a manual version if they so wish?
I think a kit containing all the parts is good for you. It saves you from soldering so many units.

A set of bare PCB would also be nice for those who which to source components on their own.
professor_jonny wrote:Of note the board has 7 0402 smd components on it that are 1mm long .5mm wide and will require a fine tip iron and a steady hand!!!!
TL;DR You should put current limiting resistors between the PICAXE and the 3 mode select signals on the AVIP port. You should also check the programming of the PICAXE to never set its IO pin as an output when you want a mode select signal to be set to 1.

I think your next revision should include some more. Reading your manual, I noticed you can use the PICAXE to modify the state of the Mode select signals on the motherboard. There's a high probability that the majority of Xbox video cables simply tie the desired mode select signal directly to ground to toggle them(and you should assume so even if it's not the case). That could lead to some problems.

An hypothetical problematic scenario is when you have a RGB SCART cable plugged in the AVIP port (with 3 mode signals tied directly to ground) and the PICAXE wants to switch video mode to something else like Composite(of which only a single mode signal is supposed to be set to ground). PICAXE will try to raise the desired signal lines to a logical 1(5V I think) by supplying current directly to ground, producing a short circuit of it's supply to ground, probably burning the IO pin, if not completely toasting the PICAXE. I did not find if PICAXE had some sort of over current protection or even how much current you could source/sinking per pin.

Of course, if no cable is plugged in the AVIP port when you want to switch video mode that's fine. Otherwise, your logic should forbid any video mode change when the Xbox boots with a video cable inserted (ie when not all 3 mode select signals reads 5V). User should also never try to insert a video cable in the AVIP port while the Xbox is powered ON.

There is a potential solution to this problem: current limiting resistors between the PICAXE and the mode select signals on the AVIP. The downside of this is that you must find the appropriate value to counter the effect of the pull ups on each mode select signals when you want to bring a specific mode select signal to a logical 0(setting it to a logical 1 when no cable is inserted is no problem). I don't know what value they are but the ideal scenario would be to select current limiting resistors with values 10 times lower than those of the pull ups. You can see the problem as a voltage divider circuit. You've got your 5V source, pull up resistor, current limiting resistor and finally PICAXE IO pin that acts as a ground (current sink). The trick is to bring the voltage level between the 2 resistors (where mode select signal is) close as possible to a logical 0. 1V should be acceptable here but lower is always better. Finding a value for such problem isn't hard if you know the value of the pull up. However, you must make sure that the resulting current that will flow through the circuit is not higher than the limit of current the PICAXE can sink on a single IO (should be in the range of a few mA).

To avoid having to consider current flow when PICAXE is trying to source a logical 1 when a cable forced the same signal to ground. You should make sure the programming of the PICAXE will only change it's IO to an output to force a logical 0. IO should be HiZ when it's not the case. Forcing a logical 1 is not necessary because of the pull ups already in place. That will make sure you won't burn any component because of excess current. The only downside(if it's any) is that the PICAXE won't have control over the mode select signal lines when a cable is inserted in the AVIP port. The positive thing is you won't have any component failure in case of a user error (inserting cable when Xbox is already powered ON).

User avatar
professor_jonny
Posts: 1233
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 56 times
Been thanked: 174 times

Re: Xbox AVIP break out board

Post by professor_jonny » Wed Mar 18, 2015 8:07 pm

The unit will never source voltage to the io pins it just leaves the mode pins as high z so a short should never be a Possibility, yes current limiting resistors are a good idea but I did see the potential problems with them and at the moment im just playing with proto types.

The first thing the chip does is fire up with the pins in high z input mode to detect the presence of a video cable and it it finds one it will leav all pins in a high z state until it sees a reset or power off locking any mode changes with a cable inserted.

If someone should pop in a cable when running the picaxe will detec the presence of the reset signal I have allowed for that but I did not really like the idea of soldering to the reset line of the hyper transport bus I was looking for a true reset trace somewhere i think it is available on the pic/smc.

if someone should start up in toggle mode it will detect the presence of the pack and not go into toggle mode.

in toggle mode the io pins may set a logical 1 im not really to sure on the output block if i sed it to nil if it reverts to an input in high z and potentially it will short if someone plugs in a pack with the current program but i will fix it to stay high z i guess I would of found that when i tested it,

As the mode select pins are both inputs and outputs unused ones are forced to be inputs but in toggle mode I will fix it to be high z.

I did hope that all unused mode pins on all avpacks were left floating as i could see it a potential problem i have yet to find one tied to 5V on pin 24, potentially that could be a disaster also I have tried several and they are all floating, but I don't have a fanacy x2vga to see if they did but all the ones I have don't do that.

but all great feed back this is what I need :-)

User avatar
professor_jonny
Posts: 1233
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 56 times
Been thanked: 174 times

Re: Xbox AVIP break out board

Post by professor_jonny » Wed Mar 18, 2015 9:56 pm

spicemuseum wrote:
professor_jonny wrote:Here is a link to the beta version of the installer manual on google docs.

https://docs.google.com/document/d/1ht7 ... sp=sharing

I have also done minor modifications to the board layout as it failed verification because of the routing cabibilities and because of the trace widths for the polygon layer was too large to upload to pcb manufacturing site.

link replaced on initial page
Jonny, I proof-read your document and fixed a few spelling, punctuation, typo and grammatical mistakes. I hope the updates are visible to you, I'm not so familiar with Googledocs (and I'll forgive your American English spelling of some words (with zeds instead of esses :-) ):
https://docs.google.com/document/d/1ht7 ... sp=sharing
lol yip my spelling and grammar is not so good :-) I hated English at school I failed 3 times around for school certificate but Passed bursary calc, stat, physics, graphics etc in my school certificate year( I was elevated three years in all my other subjects).

That's why I ended up as an instrument technician with a minor in electronics and not an English teacher.

User avatar
spicemuseum
Posts: 906
Joined: Mon Jul 09, 2012 11:08 pm
Has thanked: 94 times
Been thanked: 75 times

Re: Xbox AVIP break out board

Post by spicemuseum » Thu Mar 19, 2015 10:36 am

professor_jonny wrote:lol yip my spelling and grammar is not so good :-) I hated English at school I failed 3 times around for school certificate
You're doing yourself down. As a first draft I thought it was pretty damned good. And significantly better than most user guides written by techies.

psyko_chewbacca
Posts: 213
Joined: Fri Oct 05, 2012 5:19 pm
Location: Québec, Canada
Has thanked: 21 times
Been thanked: 125 times

Re: Xbox AVIP break out board

Post by psyko_chewbacca » Thu Mar 19, 2015 12:32 pm

professor_jonny wrote:If someone should pop in a cable when running the picaxe will detec the presence of the reset signal I have allowed for that but I did not really like the idea of soldering to the reset line of the hyper transport bus I was looking for a true reset trace somewhere i think it is available on the pic/smc.
Just remember that between the moment the cable is inserted in the AVIP port and your PICAXE micro resets its IO to HiZ, a lot of time was elapsed.
1-PIC detects cable insertion
2-PIC sends interrupt to the CPU
3-CPU reads PIC to know the source of the interrupt
4-CPU pulse reset line
5-PICAXE catches the reset signal
6-PICAXE switch its IO to HiZ.

I bet this whole process takes a few milliseconds to accomplish. Leaving a short circuit for this period of time will not instantly kill the PICAXE but will surely damage it. Doing it over and over will result in chip failure over time.
BTW, the CPU reset line is on the LPC port; pin 5. It's 3.3V LVTTL. It's probably on the video encoder too. Maybe it's on the PIC too but not necessarily on its dedicated RST/MCLR pin (usually pin 4 on PICs).
professor_jonny wrote:if someone should start up in toggle mode it will detect the presence of the pack and not go into toggle mode.

in toggle mode the io pins may set a logical 1 im not really to sure on the output block if i sed it to nil if it reverts to an input in high z and potentially it will short if someone plugs in a pack with the current program but i will fix it to stay high z i guess I would of found that when i tested it,

As the mode select pins are both inputs and outputs unused ones are forced to be inputs but in toggle mode I will fix it to be high z.


Without resistors, I would avoid ever changing IO pins from HiZ mode, unless you trust the user to never plug in a video cable while the Xbox is running.
professor_jonny wrote:I did hope that all unused mode pins on all avpacks were left floating as i could see it a potential problem i have yet to find one tied to 5V on pin 24, potentially that could be a disaster also I have tried several and they are all floating, but I don't have a fanacy x2vga to see if they did but all the ones I have don't do that.

That's an interesting point you raise. Maybe some cables do force signals up for mode select pins that need to be set to a logical 1. It's not necessary to do so as the pull ups on the motherboard will do the job just fine but I wouldn't be surprise to see cables with some pins tied to 5V!

professor_jonny wrote:but all great feed back this is what I need :-)
You're very welcome, designing hardware can be a pain sometimes. It's always a little bit annoying having to redesign your stuff because of potential issues like that. I know I had my share of those!

User avatar
professor_jonny
Posts: 1233
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 56 times
Been thanked: 174 times

Re: Xbox AVIP break out board

Post by professor_jonny » Thu Mar 19, 2015 1:23 pm

psyko_chewbacca wrote: Just remember that between the moment the cable is inserted in the AVIP port and your PICAXE micro resets its IO to HiZ, a lot of time was elapsed.
1-PIC detects cable insertion
2-PIC sends interrupt to the CPU
3-CPU reads PIC to know the source of the interrupt
4-CPU pulse reset line
5-PICAXE catches the reset signal
6-PICAXE switch its IO to HiZ.

I bet this whole process takes a few milliseconds to accomplish. Leaving a short circuit for this period of time will not instantly kill the PICAXE but will surely damage it. Doing it over and over will result in chip failure over time.
BTW, the CPU reset line is on the LPC port; pin 5. It's 3.3V LVTTL. It's probably on the video encoder too. Maybe it's on the PIC too but not necessarily on its dedicated RST/MCLR pin (usually pin 4 on PICs).
In the code I have done all pins are in high z mode all the time except when being set low it will rely on the motherboard for pullups, I do admit the toggle mode is not so I have overlooked that but i will fix it.

As soon as a change happens from an xbox reset it reverts every thing back to highz input,in theory a avpack will set ground of an already grounded signal so there should be no shorts but if some silly manufacture ties the unused pins to 5vdc it would not be good, but a have not found that problem yet.

But in saying that many people have mode switches jacked on their xbox and I have not read any ill effects from this (yet).

If a pack is pluged in that does not set an unused mode select pin to another state from the previous high z mode it will not change state currently as there is no way to detect a paralell change in mode from an already set pin.

This will be the problem in rgb mode for example all three pins are set low if you plug in any pack the pic cant see a change as they are driven low by the micro to ground really there is no way around this with out cutting traces and detecting things seperatly, I believe there are 5mil traces even I'm not that game.

This was something I was going to test by making the micro have slight pull up of the grounded mode still logic 0 but above ground a little pin so I could detect the change in state from an adc read on the mode pins on the other side of the raising resistor network.

That was one of my test things when I got the pcb's here, in all up for suggestions if you can think of another way of doing it, it will get rid of the need for a reset signal and it will protect the micro from excesive current but will require 3 seperate adc read inputs to detect a true grounded mode select pin.

psyko_chewbacca
Posts: 213
Joined: Fri Oct 05, 2012 5:19 pm
Location: Québec, Canada
Has thanked: 21 times
Been thanked: 125 times

Re: Xbox AVIP break out board

Post by psyko_chewbacca » Thu Mar 19, 2015 6:58 pm

professor_jonny wrote:
psyko_chewbacca wrote: Just remember that between the moment the cable is inserted in the AVIP port and your PICAXE micro resets its IO to HiZ, a lot of time was elapsed.
1-PIC detects cable insertion
2-PIC sends interrupt to the CPU
3-CPU reads PIC to know the source of the interrupt
4-CPU pulse reset line
5-PICAXE catches the reset signal
6-PICAXE switch its IO to HiZ.

I bet this whole process takes a few milliseconds to accomplish. Leaving a short circuit for this period of time will not instantly kill the PICAXE but will surely damage it. Doing it over and over will result in chip failure over time.
BTW, the CPU reset line is on the LPC port; pin 5. It's 3.3V LVTTL. It's probably on the video encoder too. Maybe it's on the PIC too but not necessarily on its dedicated RST/MCLR pin (usually pin 4 on PICs).
In the code I have done all pins are in high z mode all the time except when being set low it will rely on the motherboard for pullups, I do admit the toggle mode is not so I have overlooked that but i will fix it.

As soon as a change happens from an xbox reset it reverts every thing back to highz input,in theory a avpack will set ground of an already grounded signal so there should be no shorts but if some silly manufacture ties the unused pins to 5vdc it would not be good, but a have not found that problem yet.

But in saying that many people have mode switches jacked on their xbox and I have not read any ill effects from this (yet).

If a pack is pluged in that does not set an unused mode select pin to another state from the previous high z mode it will not change state currently as there is no way to detect a paralell change in mode from an already set pin.

This will be the problem in rgb mode for example all three pins are set low if you plug in any pack the pic cant see a change as they are driven low by the micro to ground really there is no way around this with out cutting traces and detecting things seperatly, I believe there are 5mil traces even I'm not that game.

This was something I was going to test by making the micro have slight pull up of the grounded mode still logic 0 but above ground a little pin so I could detect the change in state from an adc read on the mode pins on the other side of the raising resistor network.

That was one of my test things when I got the pcb's here, in all up for suggestions if you can think of another way of doing it, it will get rid of the need for a reset signal and it will protect the micro from excesive current but will require 3 seperate adc read inputs to detect a true grounded mode select pin.
Ok, now I understand. You're right in your logic to set the PICAXE to only output '0' in output mode. This will not kill the pic providing the inserted cable does not force mode select pins to '1' and PICAXE can have it's output register assigned on the fly as you change IO mode from HiZ to output mode. Most micro do that but some do have a small transitionnal phase where output value is undefined while it's in transition from HiZ to output.

For your ADC reading, you can set up a 3 stage resistor ladder to capture 3 binary signals of a single ADC channel.
http://en.wikipedia.org/wiki/Resistor_ladder
It does put a significant amount of extra resistors on the board though...

User avatar
professor_jonny
Posts: 1233
Joined: Thu Jul 05, 2012 5:41 am
Location: New Zealand
Has thanked: 56 times
Been thanked: 174 times

Re: Xbox AVIP break out board

Post by professor_jonny » Fri Mar 20, 2015 3:23 am

the mode pins can be set to high z inputs on the fly and upon making a set pins command it only sets the pins required to output and it leaves the others alone so they will stay high z input

this is sort of what I guessed I would try to see if I could set the mode pin logic low but not to ground.
then the ADC will read the sate of the mode pin directly and if it goes to true ground it will see a pack change.
it may be unreliable or may require a zeener in there for good measure.
resistor.jpg

psyko_chewbacca
Posts: 213
Joined: Fri Oct 05, 2012 5:19 pm
Location: Québec, Canada
Has thanked: 21 times
Been thanked: 125 times

Re: Xbox AVIP break out board

Post by psyko_chewbacca » Fri Mar 20, 2015 1:10 pm

professor_jonny wrote:the mode pins can be set to high z inputs on the fly and upon making a set pins command it only sets the pins required to output and it leaves the others alone so they will stay high z input

this is sort of what I guessed I would try to see if I could set the mode pin logic low but not to ground.
then the ADC will read the sate of the mode pin directly and if it goes to true ground it will see a pack change.
it may be unreliable or may require a zeener in there for good measure.
resistor.jpg
I wouldn't put a pulldown resistor there. Unless it's resistance value is very very high compared to the pull up, you'll end up creating a voltage divider that could possibly set a mode select pinat a voltage level that sits in the undefined region between a logical 1 and 0. Yo don't need a pull down unless there's something I'm not seeing here.

As for the ADC, why would it need to read an analog voltage level? Possible state of a mode select pins are either 0V or 5V. There's no in-between. Standard digital IO will do just fine, plus, digital IO are processed faster in the micro than an ADC conversion; much faster!

If you're short on pins to read state of mode select pins, you can create a R/2R resistor ladder to connect all 3 mode select pins on a single ADC channel.
Like so:https://learn.sparkfun.com/tutorials/logic-levels

Play with it(you'll need to register to run the simulation). The 3 voltage sources represent state of mode select pins while the analog voltmeter is the input pin of the ADC. With this setup you can associate a certain analog voltage level to a binary combination of states of mode select pins.

If you're not short on input pins, why not simply take 2 pins of the PICAXE for a single mode select signal? 1 input to read value and 1 output to force a value on it.

Post Reply