Guest psytron Posted June 27, 2003 Report Share Posted June 27, 2003 i recently upgraded my box (1xcore 1xlcd 1xain with 8 pots)After getting bored of just having 8 pots i felt the need for some digital in action. :)so i went and got the parts for a dinx4 module.dick smiths didnt have all the parts so i ended up with 2 shift registers 10x 10k resistors 4x 12k resistors.i used 8x 10k for buttons (first reg)4x 12k for r33-r361x 74hc165 stuffed into first ic socketusing mios 1.3 (and associated test/example progs)i used ain64_din128_dout128.zipwith the following mods USER_Init ;; initialize the AIN driver ;; use 64 pots movlw 8 <- - - - - - - - - - - - - changed from 64 to 8 call MIOS_AIN_NumberSet ;; use the AIN 4051 multiplexers call MIOS_AIN_Muxed ;; define the deadband (with 7-bit values, a deadband value of 8 is adequate; ;; calculated with the following formula: (2^(10 bit - 7 bit)) - 1 = (2 ^ 3) - 1 = 7 ;; set value to 0 or 1 if you want to see the 10-bit value at the LCD movlw 7 call MIOS_AIN_DeadbandSet ;; define number of shift registers: for 128 buttons and LEDs, we need ;; 16 registers. Btw.: thats the maximum number of supported DIN/DOUTs movlw 1 <- - - - - - - - changed from 16 to 1 call MIOS_SRIO_NumberSet ;; define the update frequency (latency) of DIN/DOUTs in mS movlw 1 ; ms call MIOS_SRIO_UpdateFrqSet return the pots work fine but the buttons (no buttons yet just a wire from gnd to touch the sil headers) do notmy voltage for the buttons is .95v measured from gnd to sil header pin for button.just wonderin if software or hardware prob?one day i will throw my keyboard away and just use mios :) Quote Link to comment Share on other sites More sharing options...
jeroddumas Posted June 27, 2003 Report Share Posted June 27, 2003 I would check soldering and traces if you used a PCB. Definately a hardware problem. Quote Link to comment Share on other sites More sharing options...
Guest psytron Posted June 27, 2003 Report Share Posted June 27, 2003 ok after some mucking around(found a bridge)my button voltages are now aprrox 5vhowever none of my buttons work, but when i close or open the first button from the left on the top (same side up as in pic on din page)i recieve a din event (and midi) that corresponds tobuttons 0 thru 7 being turned all on then i close circut then the same again when i open the circut.i.e.press button----->button 0 onbutton 1 onbutton 2 onbutton 3 onbutton 4 onbutton 5 onbutton 6 onbutton 7 onlet go of button---->button 0 offbutton 1 offbutton 2 offbutton 3 offbutton 4 offbutton 5 offbutton 6 offbutton 7 offor all the way to 127 when i use all 16 shift reg in mios code as above Quote Link to comment Share on other sites More sharing options...
jeroddumas Posted June 27, 2003 Report Share Posted June 27, 2003 Check your connections again Quote Link to comment Share on other sites More sharing options...
Steven_C Posted June 27, 2003 Report Share Posted June 27, 2003 Check your connections again yeah I agree here, sounds like a short... does this happen if you short the ground to the SIL header now? Quote Link to comment Share on other sites More sharing options...
Guest psytron Posted June 29, 2003 Report Share Posted June 29, 2003 does this happen if you short the ground to the SIL header nowisnt that what happens when you press a button?i think a short is highly unlikely now i have been over the board a few times with my multimeter.my chips (shift registers) are m74hc165b1i know the m is no problem (i think).the b1 i have not been able to find a data sheet on.the ics are from SGS. i presume that they are just normal 74hc165 but i dont know enuf to say for sure.the voltages for my shift reg are(measured from gnd)pin1 5vpin2 .11vpin3 4.96pin4 4.96pin5 4.96pin6 4.96pin7 0pin8 0pin9 5.01/5.02pin10 5.01/5.02 pin11 4.96pin12 4.96pin13 4.96pin14 4.96pin15 0pin16 5.01/5.02there are 2 ics stuffed the seconds voltages are the same EXCEPT for pin 10 whitch is 4.96/4.97v Quote Link to comment Share on other sites More sharing options...
smashtv Posted June 29, 2003 Report Share Posted June 29, 2003 my chips (shift registers) are m74hc165b1i know the m is no problem (i think).the b1 i have not been able to find a data sheet on.the ics are from SGS. i presume that they are just normal 74hc165 but i dont know enuf to say for sure.The M is in front of almost all 74XX DIP series ST IC's, and the B1® just means it is a DIP package, Tube package (as opposed to bulk or tape&reel for SOP or TSSOP)Sorry I can't be more help with your problem!Datasheet is at :http://us.st.com/stonline/books/pdf/docs/1911.pdfLater!Smash Quote Link to comment Share on other sites More sharing options...
jeroddumas Posted June 29, 2003 Report Share Posted June 29, 2003 Let me know if this is correct, when you press one button, multiple buttons are registered? If so be sure that the buttons are wired in correctly.Jerod Quote Link to comment Share on other sites More sharing options...
Guest psytron Posted July 3, 2003 Report Share Posted July 3, 2003 thanks for the clarification on the chip. As you can tell i am only learning about this stuff.i checked up on the chip thru farnell's data sheets and was confused when the data sheet said that pin 15 on my chip "SGS m74ch165b1" was "clock enhibit" where as on others it said "clock enable" to me they sound opposite to each other but they must be the same. thanks again for the info smashtv...If so be sure that the buttons are wired in correctly no buttons yet just me shorting it out to earth. just trying to limit the possable amount of errors. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.