Shift Register and Relays? Answered

Using a 74hc595 shift register to a ULN2003 darlington array to control 7 relays, all controlled by an MSP430, connected via RJ11.  The relays are controlling LED Christmas light strings on and off.  Everything seems to be functioning so far but the problem is that relays that aren't being told to turn on sometimes are turning on.  The shift register is connceted with Qa to the master reset of the register so I can clear is quickly, but so far I have been just leaving it high.the other 7 outputs (Qb - Qh) connected to the base pins of the ULN2003 (B1 - B7).  The outputs of the ULN2003 connected to the relay coils, COM connected to 5v, emitter connected to ground.  I have tried pull down resistors on the base pins, I have tried tweaking the code which I tried to set up to just bit bang the shift register, make it as simple as possible just to test it and a sample is provided below for one iteration.  I have it looping through several of these to turn a single channel on each time to check to make sure all the channels work.  It however sometime make a channel just flicker, not turn on at all, or turns several channels on at the same time.  I am curious as to whether this is a hardware problem (pullup/down resistors, filtering caps, more clamping diodes then what is built into the ULN2003, whatever) or whether I am just an incompetent programmer.  I am fairly certain the problem lies somewhere between the driver seat and the steering wheel though.  One thought I had but do not want to try right away is it possible the shift register is bad?  Overheated from soldering?  I try to solder one pin on chips, then a pin on another component, then a pin on the opposite side of the chip, etc to keep chips cool when soldering them, but are the 74hc595 very heat sensitive maybe?  Would appreciate a fast answer, looking to build 5 more of these so I can control all my Christmas lights. This was supposed to be a cheap and dirty project so I didn't get into Triacs and dimming, I just want to turn lights on and off as I see fit.   i = 30000;   P1OUT = 0x00;        //Channel 7 (unused)   P1OUT |= 0x02;       //Clock in   P1OUT &=~ 0x02;   //Clock low   P1OUT = 0x01;        //Channel 6 (Green Wreath)   P1OUT |= 0x02;       //Clock in   P1OUT &=~ 0x02;   //Clock low   P1OUT = 0x00;        //Channel 5 (Red Icicle)   P1OUT |= 0x02;       //Clock in   P1OUT &=~ 0x02;   //Clock low   P1OUT = 0x00;        //Channel 4 (White North)   P1OUT |= 0x02;       //Clock in   P1OUT &=~ 0x02;   //Clock low   P1OUT = 0x00;        //Channel 3 (White South)   P1OUT |= 0x02;       //Clock in   P1OUT &=~ 0x02;   //Clock low   P1OUT = 0x00;        //Channel 2 (Blue North)   P1OUT |= 0x02;       //Clock in   P1OUT &=~ 0x02;   //Clock low   P1OUT = 0x00;        //Channel 1 (Blue South)   P1OUT |= 0x02;       //Clock in   P1OUT &=~ 0x02;   //Clock low   P1OUT = 0x01;        //Channel 0 (Clear All/Active Low)   P1OUT |= 0x02;       //Clock in   P1OUT &=~ 0x02;   //Clock low   P1OUT |= 0x04;       //Latch outputs   P1OUT &=~ 0x04;   //Latch low   while(i > 0)   {         i--;   }

Asked by Electric Spectre1 2 years ago  |  last reply 2 years ago


Comments don't register

Not sure if it is just me or not, but for the last 6 months or so, whenever I comment it never gets registered as a comment in the instructable. Example~ www.instructables.com/id/How-to-Create-Your-First-Website/                      www.instructables.com/id/Compact-Camera-Bottom-Ball-Grip/   These now have atleast 1 comment from me, yet still register 0 comments on the recent I'ble screen. The comment in the thread appears fine. I know this is not such a great importance, yet when I comment, I specifically try and draw attention to an I'ble with no comments. The cause is not helped if it still registers no comment... If you could help out that would be tops.... Thanks guys and gals. : )

Posted by Lftndbt 9 years ago  |  last reply 9 years ago


Pesky shift registers? Answered

I started working with 2 74HC595N to control 8x8 matrix, and found that instead of a dot it activates multiple rows. So I assumed this was due to my lack of knowledge about shift registers so I setup a simple scenario from arduino ShiftOut tutorial (single register chip and 4 LEDs controlled by number via serial input i.e. "one by one sketch". Thats when I found out that shift register has almost random values on its output pins. Some LEDs were on, some off before I started to controll them. After I turned on/off all 4 it strated to work as supposed to, but last pin retained "memory" of its state even if I reset Arduino.  So my question is, do I always need to initialize every pin of every shift register (and is there an example sketch), or do I have faulty IC? Edit: Added schematic (it's from http://arduino.cc/en/Tutorial/ShiftOut)

Asked by bratan 6 years ago  |  last reply 3 years ago


Creating and Registering a Trademark

Does anyone know and understand the process of creating a trademark? As best as I can gather creating a trademark is as easy as putting TM after what ever you would like trademarked. However, if you wish to register your trademark so you can have the R behind it that is where the line starts to blur and become a little more fuzzy. There are some fairly expensive fees as well as quite of bit of research that you first must do or face losing your $300+ fees.  So if anyone has had anything registered with the Us Copyright and Trademark office please share your experience. 

Posted by xtreker15 7 years ago  |  last reply 7 years ago


Registering to see all steps

Maybe this has a topic already, if so, I apologise! I think it must be new, having to register to see all steps. I don't like it! Annoying for when I'm at school and don't want to log in and just generally inconvenient. I think it might put new people off using instructables because registering just to see how to do a project is quite a turn-off. I know the service is free and I feel bad only ever making a contribution to complain! Instructables is a great site and one of my most visited, I really do love it! Anyway, just my thoughts.

Posted by unigamer 11 years ago  |  last reply 5 years ago


My votes aren't registered

When I vote for a contest, my vote doesn't seem to register. I click to the grey "Vote" button and it turnes to orange "Voted", but when I return to the page, it is grey again and says "Vote" as if I haven't already voted. My specs are : A desktop PC GNU/LINUX Ubuntu Mate 15.10 x86-64 kernel 4.2.0-35-generic Mozilla Firefox 45.0+build2-0ubuntu0.15.10.1 I first noticed the bug right after I published my two last instructables : https://www.instructables.com/id/The-Hanging-Gardens-of-Babylon-with-Gourd/ https://www.instructables.com/id/Simple-Gourd-Birdhouse-With-a-Branch/ The instructables contained stock photos that had to be removed in order to be published. Maybe it has something to do with this?

Posted by taloskriti 2 years ago  |  last reply 2 years ago


PINB register on ATtiny45 not working? Answered

I've been programming a pretty simple led driver in Atmel Studio 6 with the attiny45. The idea is that hitting a push button will advance through three different modes of the LEDs, solid, strobe, and fade. When you reach the last mode hitting the button again should reset to the first mode. For some reason the PINB register doesn't seem to be working. Here is the code: #define F_CPU 1000000 #include #include int main(void) { //  Setup PWM TCCR0A |= (1 << COM0A1) | (1 << WGM00) | (1 << WGM01); TCCR0B |= (1 << CS01); DDRB |= (1 << PB0)|(0< PORTB = 0b00010000;   //enable internal pull up int state = 2;  //initialize some variables while(1) {   //int val = PINB3;       if(PINB == 0)   //if button is pressed, increment state variable   {    _delay_ms(100);   //primitive debouncing...     state = state + 1;   }       if(state > 2){  //if we exceed the number of modes, reset state variable       state = 0;   }else   {    state = state;  //probably not necessary, but has solved problems in the past.   } while(state == 0){   //first mode just turns on LEDs at full brightness     OCR0A = 255; } while(state == 1){  //second mode strobes the LEDs     OCR0A = 255;   _delay_ms(35);   OCR0A = 0;   _delay_ms(35); } while(state == 2){    //Third mode fades LEDs      //  Fade LED on    for(i = 0; i < 255; i++)    {     //  Load new value onto OCR0A register to change duty cycle     OCR0A = i;     _delay_ms(5);    }       //  Fade LED off    for(i = 255; i >= 0; i--)    {     OCR0A = i;     _delay_ms(5);    } } } } All of the independent modes work fine, and even the state variable itself is doing what it is supposed to (I know because initializing it to different values gets me the correct mode) but for some reason the PINB register is not getting any kind of response. I am enabling the internal pull up, and then the button connects the I/0 (in this case PB4) to ground which should make the state zero and satisfy the argument of the if statement, but for some reason this is not doing anything. Any ideas? thanks in advanced!

Asked by Higgs Boson 4 years ago  |  last reply 4 years ago


LED sink driver and Arduino question.?

Hi ... I would like to ask, if I can use 2 of these LED sink drivers uk.farnell.com/jsp/search/productdetail.jsp by using/controlling them just from 3 pins on my Arduino ??? I think, that it should be possible thanks to the pin22 SDO (datasheet www.farnell.com/datasheets/456099.pdf) ... what do you think ??? If yes, is there any limitation on HOW MANY shift registers/LED drivers you can connect "in a row" by using just 3 pins on Arduino ??? Could I use 4 of these drivers and control them just by 3 pins on Arduino ??? Thank you in advance for your answers...zholy

Asked by zholy 8 years ago  |  last reply 8 years ago


Unable to create instructables- Redirected to RegisterNew

Dear all, Since a week i am not able to make ANY new instructables on ANY of my Machines. The new instructable button simply re-directs me to- https://www.instructables.com/account/gopro?newMember=true I tried clearing the cahce, Cookies and trying it on 3 PCs that I have. Same problem. Please help.

Posted by bhvm 3 years ago  |  last reply 3 years ago


How would you register a custom built EV? Answered

How would you go about titling and registering a scratch built (Like, from tubing and such) electric vehicle? Since it would be made from scratch, it wouldn't have any VINs. Thanks. 

Asked by Zem 8 years ago  |  last reply 8 years ago


Shift register too slow for multiplexing?

Hi, I'm trying to figure out working with shift registers. I bought a couple of 74HCT4094's, hooked them up through my breadboard to a small matrix with some LEDs and my Arduino. Without multiplexing everything works fine, but no matter what circuit I build (changing wires, resistors, transistors, even the Arduino code), when I start to multiplex the LEDS clearly 'flicker' (is that the correct term?). Is it possible that some shift registers are 'too slow' for multiplexing with Arduino?

Posted by Huibgeboers 6 years ago  |  last reply 6 years ago


Combinational Lock using shift registers

Last year, i made the circuit of this already but now my brother is asking for my help and i cannot remember it now. im focusing right now in programming and forgot my logic circuit skills..please help me to remember this... what i remembered is that i have shift registers that memorized the buttons (0-9) i pressed...then i enter again a sequence of numbers and the device will check if it corresponds to the numbers i entered...the led will light if it is correct and will not if the numbers entered did not match the default numbers... i still have the list of some materials, 3 universal shift registers, 1 nand ic, 3 xnor ic, 10 toggle switch and 1 hold switch..  its not a very complex circuit..my only problem is to remember on how will i work with the shift registers... please enlighten me once again

Posted by eaon21 8 years ago  |  last reply 8 years ago


Shift Registers vs LED Drivers?

I am trying to figure out how to program an arduino to control LEDs. Basically, what I have done, is I have made a 3x3 matrix and can program some simple sequences with the LEDs using the digitalWrite and delay functions.  I'm not even sure that this is the right way to do this, I don't think it is, but it works.  Anyway I want to try to program bigger matrices and maybe LED cubes using my arduino, but without using up all of the output pins. So, I've came across two ways to get more outputs from less pins; LED drivers and shift registers.  These may be the same thing and I'm just not aware.  But anyway, is there a difference between them? I've really only found information about shift registers, nothing really about LED drivers.  Is one easier to program? Does one use less pins than the other? Or are they just the same thing?

Asked by texpert 4 years ago  |  last reply 4 years ago


How to control 100 bidirectional DC motors?

Hi,  I'm trying to control 100 DC motors using a microcontroller (Arduino Mega) The motors run on 1.5V and have a operational current of 40mA. 1) Each motor must be able to rotate clockwise and counter clockwise 2) The motors must be able to move independently     (though direction of the motors at any one time will be the same)      eg. at time = 0; motor 1,20, 30, 45 will rotate CW            at time = 10; motor 20, 35, 80 will rotate CCW 3) Using minimum amount of pins from the Arduino (Shift Register ?) How should i go about doing this ? I have tried using L293D H-Bridge, but in order to control 100 motors,  i will need 50 H-Bridges and 200 digital output pins I'm thinking of a simpler circuitry (image attached) to control the motors. Digital output pins from the Arduino will contol the relay switches, and the DPDT relay will change the polarity of the the voltage supply. Will this work ?  Are there any smaller alternatives to the mechanical relay (transistor ?)  Can a transistor allow current flow in both directions ? I would really appreciate if you could provide some inputs and ideas as to how you would go about controlling a large amount of motors. Cheers!

Asked by fujiapple 4 years ago  |  last reply 4 years ago


Re-purposing a scanner CCD into an analog shift register

How tough would it be to do that? Based on the research I've done so far, That could be one hell of a challenge for a noob like me. Knowing that, is there a part (preferably 8-bit and has lots of inputs/outputs) that would do the same thing for me? This will be used in a similar fashion as a CCD sensor setup, but light isn't the medium I want to measure

Asked by The Ideanator 8 years ago  |  last reply 8 years ago


Unable to Log In to Vote for Craftsman Contest

I have had several people inform me that after registering they could not acquire access to their account and they could not access to vote, as the system would not recognize them. Your comments and assitance appreciated. I am concerned because this may eliminate me from my entry qualifying for the next stage in the contest. https://www.instructables.com/id/How_To_Make_A_Custom_Fancy_Walking_Cane/

Posted by mmh 10 years ago  |  last reply 10 years ago


I Need a little Help with Shift Registers

Hello, I'm both new to Instructables, and electronics in general. I'm trying to make a Divergence Meter, but I'm using LED's instead of nixie tubes. (It's safer for having my little cousins around.) I'm hoping to control each tube with one shift register per tube. Each tube will have 11 imputs and 1 output. I was curious if you guys had any tips on how to do that with the standard 16 pin registers, or if you could direct me to one that could do it. Thanks.

Posted by Glyngsdal_inovations 1 year ago


I Need a Little Help with Shift Registers

Hello, I'm both new to Instructables, and Electronics in general. I'm trying to make a Divergence Meter, but I'm going to be using LED's and etched acrylic instead of Nixie tubes. (It's safer for having my little cousins around.) I'm hoping to control each tube with one shift register per tube. Each tube will have 11 inputs and 1 output (11 LED's 0402 type). I was curious if you guys had any tips on how to do that with the standard 16 pin registers, or if you could direct me to one that could do it. Thanks.

Posted by Glyngsdal_inovations 1 year ago  |  last reply 1 year ago


Chaining 4 74HC595 shift registers together

I have a question about chaining 4 shift registers together.I am going to be sending data to four shift registers and my question is this, when all four are loaded and latched if I send more data is it possible to only send data to the first register in the chain without the others losing their values?

Posted by mbcharney 5 months ago  |  last reply 5 months ago


Can a shift register be too slow for multiplexing?

Hi, I'm trying to figure out working with shift registers. I bought a couple of 74HCT4094's, hooked them up through my breadboard to a small matrix with some LEDs and my Arduino. Without multiplexing everything works fine, but no matter what circuit I build (changing wires, resistors, transistors, even the Arduino code), when I start to multiplex the LEDS clearly 'flicker' (is that the correct term?). Is it possible that some shift registers are 'too slow' for multiplexing with Arduino?

Asked by Huibgeboers 6 years ago  |  last reply 6 years ago


Modifying doorbell to register a SmartThings device connection?

I'm hoping someone can help me here. I've got a Byron BY601 Wireless doorbell which comes in 2 parts - the chime and the doorbell. The Chime takes 3x AA batteries, and the doorbell takes 1X CR2032 battery. What I'm trying to do, if figure out a way that when the doorbell is pressed, it activates the connection on a SmartThings device. I have a SmartThings multiswitch which can acts as a Reed Switch for an Open/Closed signal to SmartThings, this however, takes a  CR2450 battery. I've attached some images, but I'm wondering if anyone reckons they might be able to figure out just by looking where I could make some connections to trigger the device to activate?

Posted by K20Evo 3 years ago  |  last reply 3 years ago


How to drive serial data via (shift registers) AVR?

Is there some sort of code that will allow easy serial data tranfser from an AVR to a shift register (specifically the max6921 driver)? Thanks

Posted by guyfrom7up 10 years ago  |  last reply 10 years ago


Can the LP3943 source current as well, or only sink it? Answered

The link to the data sheet is here. All it talks about is sinking current, so my guess is yes.  I really wanted to use two of these to get a huge multiplexed array of LEDs, but one of them would need to be able to source the current, can it with the pins set high?  If not, are there other ICs like this that can do so? Thanks!

Asked by mojofilta 7 years ago  |  last reply 7 years ago


Which pins are which on a shift register? What pins on a 74HC595 shift register are the data, clock, and latch pins? Answered

I just bought an arduino and was trying to do this tutorial https://www.instructables.com/id/Arduino-Expermentation-Kit-How-to-get-Started-wi/step7/8-More-Leds-74HC595-Shift-Register-CIRC05/ . I have hit some trouble though and I am confused when it comes to the shift registers. When he says to connect to the clock pin, do we connect to the SCK (Shift Register Clock Input) or the RCK (Storage Register Clock Input)? When he says to connect to the data pin, do you connect to the SI (Serial Data Input)? Also what does he mean when you say to connect to the latch pin? The data sheet for the Digikey shift register I am using is in the link below.http://www.fairchildsemi.com/ds/MM/MM74HC595.pdf?

Asked by Stoned 9 years ago  |  last reply 9 years ago


Can I change the email that my account is registered with?

As the title implies, Can I change the email that my account is register on? I don't want to make another account just change the email, is this possible? Thanks for any help;) 

Posted by Team Dogoman RC 2 years ago  |  last reply 2 years ago


Forgot My Registered Email, Can't Log In!

I forgot my password AND forgot my registered email.  I created a new account but would really like to get back into my ORIGINAL account.  Sent my original account a "personal message" hoping it would be forwarded to my registered email account, but no luck.   Can't find a link to send an email help request of instructables.  Ideas?

Posted by DocRon 9 years ago  |  last reply 9 years ago


Arduino Vu meter/Mood light?

Hello There :) I have this concept: A wall to ceiling light that consists of several segments that are lit with rgb leds. I want it to have two modes - VU meter mode and rgb mode (goes through rainbow of colours) I know how to do each separately: -VU meter - There is an instructable I can follow -RGB mode -Using shift registers etc.. But I don't know how to incorporate them together. Can I use a shift register and an arduino (through PWM) to give functionality of both settings I would like? Thanks, Joe

Asked by joearkay 7 years ago  |  last reply 7 years ago


register as a class in school for Arduino challenge?

There is a motivated group of students that would like to enter as a class to the Arduino challenge.  Is there a way that could happen?

Asked by hsbtech 6 years ago  |  last reply 6 years ago


Knex voice chat

Download the client : clientregister : registerafter installing, log inthen click Voicethen go to the bottom and click Add then click " by searching "and search for knexpert then add to public servers

Posted by Katarukito 10 years ago  |  last reply 10 years ago


decoder ?

Hello , I  am going to make  decoder  for micro controller ,   I want to know how does decoder make for  microcontroller I have 4 registers I =Instruction Register A= Address register R1= register R1 R2 =register R2 Logic 0= deactivate Logic 1= activate I     A   R1    R2        out 1   1    1         0            1     //  mov R1 1   1    0          1           1     // mov R2 I AR1R2        out 0000                 0000000000000001 0001                 0000000000000010 0010              0000000000000100 0011              0000000000001000 0100             0000000000010000 0101             0000000000100000  0110             0000000001000000  0111            0000000010000000  1000            0000000100000000   1001             0000001000000000 1010             0000010000000000 1011            0000100000000000 1100            0001000000000000 1101            0010000000000000 1110            0100000000000000 1111           1000000000000000 If I know input than how to know what will decode ?

Asked by vead 4 years ago  |  last reply 4 years ago


Why now &quot;View all steps on one page&quot; works only for Pro Members!?

Before it was for registered...AND I REGISTERED JUST TO BE ABLE TO DO THAT!

Asked by LeonimuZ 9 years ago  |  last reply 9 years ago


Wiring a wav playing setup and shift register to the same arduino?

I just ran into an issue with my current setup for a project I've been working on. I would like to hookup a wav playing setup (either the Adafruit Wave Shield or a wav playing setup like this) Issue I'm having is I can't change the pins around for the shift register setup (which I have setup and working just like I like!).  I know this is probably a stupid question (what with stacking shields for the uno) but could I wire up multiple items to the same pin? IE wire pin 12 to both a shift register and a wav playing setup? If not, is there some way around this that would work on a micro that would not mean having to jump to a mega. Thanks!

Asked by DoctorWoo 4 years ago


How do I get a homemade vehicle registered in Ohio?

I plan on building a two-seater fiat styled homemade car sometime in the future and before I start building and designing I want to know what I need to put on it to make it street legal. I plan on using parts (for ex. the motor and drive-train) from a crashed or junked car and building the frame and such by myself.  I included a picture of the car I'm designing from.

Asked by Clayton H. 8 years ago  |  last reply 8 years ago


Faint LED's while using an Arduino Micro and shift register? Answered

This is more of a "How things work" question, but a question non the less. I have five 595 shift registers hooked up to an arduino micro. Everything is wired correctly, and it all works beautifully on my test bed, all the codes work fine. Only issue is that my LED's are only about half as bright as the sun.. Anyways, I was testing one of my codes at work, and due to the bright, flashing LED's that were popping up on the 595 portion of the board, decided to just power them off but removing the 5v leg going to them (I know, it would have been better to just set in an "all off" in the code, but I figured removing the power pin would work). However, removing the 5v leg to the 595 didn't turn them off: it only made them about a third as bright as they normally are. I checked to ensure that there was no power getting to the 595's, and there is not.  So: why would the LED's connected to the [unpowered] 595's still turn on?

Asked by DoctorWoo 4 years ago  |  last reply 4 years ago


I HAVE A WACOM PAD INTUOS 3, IT MALFUNCTIONED AS IT SHORTLY REGISTERED WITH VISTA. HELP. GUTTED? USB WIRING?

It malfunctioned, it shortly registered with the blue light, it intermittently went out shortly after when vista was on. is it an electronic fault? got the latest patches but it doesn't even register as it tells me it has malfunctioned, tempted to pull it apart and look at the wiring particularly the usb part. any advice would be the best, thanks for reading

Asked by 9 years ago  |  last reply 8 years ago


Problem on creating new account with Safari (snow leopard)

I can't register using Safari Browser on Snow Leopard. It redirect me on the homepage once I click the register button. So I used Firefox instead.

Posted by gnetro 9 years ago  |  last reply 9 years ago


Now that there are &quot;Go PRO!&quot; stuff does that mean that i will be treated like an unregistered member?

(quote begins here)Pro Features IncludePDF DownloadsAllsteps PreferenceRich Media VersionPro BadgeDigital PatchesLess AdvertisingPrivate ProjectsMembers-only ForumsFavorites List(Quote ends here)I remember that before i registered i had to register to see all steps on one page and(i think) PDF download of Instructables out there So i registered Here And Loved it.But Now, Pro?Does that mean that just members will be treated by the system like an unregistered member by not having all steps on one page and such?this is really dissapointing, More ads Everywhere and now You have to pay?This is looking like on of those sick websites that have questions that you have to register to see the answers, And then you have to pay to your registered account to really see answers.

Asked by ReCreate 9 years ago  |  last reply 9 years ago


Antics help!! Please Read

Umm, i just found this website called antics3d.com, and the software that used to be able to be downloaded for free, you now have to have a registered email from befor the site closed back in 08. i just found the website today, so i dont have a registered email. i am hoping that if somebody has a registered email, they would let me use it to download the new antics v5.1 and content pack. i have already checked the torrent sites i know about, but if you have a registered email or torrent site that you know offers antics, or even are willing to send me the setup exe, please private message me telling me where to get it. thanks!

Posted by A.C.E. 10 years ago  |  last reply 6 years ago


Bug report: Comment "post" button doesn't register with first click?

I've noticed this recently - the "post" button doesn't seem to register at all the first time I click it when posting a comment, even if I'm pretty patient and wait a good 10 seconds or so. Sometimes, clicking the button again will then suddenly result in duplicate comments being posted. It looks like other people might be having the same problem - for example, here the comment "could i make arduino on paper like this" is posted three times in a row: https://www.instructables.com/id/1-DIY-Conductive-Ink/ Anyone else have this problem? I'm running the latest version of Firefox (30.0).

Posted by Ben Finio 4 years ago  |  last reply 4 years ago


Need help in serial communication using SBUF register using 89C51 !!!

Actually I want to transmit 3 bits serially using AT89C51 micro-controller.I have written the code in ".c" file, using c programming trying to transmit the bits serially using SBUF register.As the SBUF register is the single register available in serial programming of 89C51, it is not updating its value. The bit which is first transmitted is only repeated in the next 2 bits, it is not being updated and then transmitted.So I want guidance regarding sending 3 bits(number / integer) using serial communication( with SBUF register).Following is the code I have written,#includevoid decimal(); void MSB(); void MIDDLE(); void LSB();void main() { while(1) { decimal(); MSB(); MIDDLE(); LSB(); } }void decimal() { unsigned char x,bin,d1,d2,d3; bin = Data_Bus; x = bin /10; d1 = bin %10; d2 = x %10; d3 = x/10; }void MSB() { unsigned char d1,a; TMOD = 0X20; TH1 = 0XFD; SCON = 0X50; TR1 = 1; a = d1 +0x30; SBUF = a; while(TI==0); TI = 0; }void MIDDLE() { unsigned char d2,b; TMOD = 0X20; TH1 = 0XFD; SCON = 0X50; TR1 = 1; b= d2 + 0x30; SBUF = b; while(TI==0); TI = 0; } void LSB() { unsigned char d3,c; TMOD = 0X20; TH1 = 0XFD; SCON = 0X50; TR1 = 1; c= d3 + 0x30; SBUF = c; while(TI==0); TI = 0; }

Asked by 140170117013 10 months ago  |  last reply 10 months ago


I give up where do I find out what classes I am registered for?

I have looked everywhere under settings etc to find what classes I am registered for this is very annoying. Even the app doesn't have a setting for it. 

Posted by CarmenL10 2 years ago  |  last reply 1 year ago


8 bit Instruction set ?

Hello experts I need some help I want to make 8 bit instruction using folloing component so I made one simple example 8 bit instruction set 4 bit opcode + 2 bit source register +2 bit destination register+ 4 bit data accumulator A memory register R1 memory register R2 memory register R3 opcode         source       destination       data 0010               00               00                 xx                  R1  01           A  01                xx                  R2  10               XX                xx                  R3  00               XX                xx load data directly into R1 mov R1#data opcode     source      destination       data 0010         R1 01          00                  data load data directly into R2 mov R2#data opcode     source      destination       data 0010         R2 10          00                  data load data directly into R3 mov R3#data opcode     source      destination       data 0010         R3 11          00                  data load data directly into A mov A#data opcode     source      destination       data 0010            00         A  01                  data mov the content of R1 into Accumulator mov A, R1 opcode     source      destination       data 0010         R1 01          01                  disable mov the content of R2 into Accumulator mov A, R2 opcode     source      destination       data 0010         R2 10          01                  disable mov the content of R3 into Accumulator mov A, R3 opcode     source      destination       data 0010         R3 11          01                 disable don't use any register disable opcode       source       destination       data 0010               00               00                 xx      don't use register

Asked by vead 4 years ago  |  last reply 4 years ago


maker space website

What are the requirements for the maker space website(used to register a team)? would a facebook page work?

Posted by JpsManCave 2 years ago  |  last reply 2 years ago


Cannot login from "Register or Login" at top of site, only inside of site.

I click login, enter my info, hit login, and loads the */gifts/*  page instead of the home page but does not log in. If i go to a function within the site that requires login, it works just fine. This just started when the */gifts/* started being used.

Posted by scottrules 8 years ago  |  last reply 8 years ago


Pro membership discounts? Answered

Hi!  Just wondering, are the discounts the same every time you register a pro membership? 

Asked by simon.w.nordberg 3 years ago  |  last reply 3 years ago


Newbie Alert!Is it possible to make a 8x8 led matrix with 74hc595 shift registers w/ arduino?

If so can someone help me with the schematic? And also I'm using an arduino uno r3 if that helps? I kind of would need help with the programming as well. I have transistors (2N3904) and resistors (100 Ohm/200 Ohm) too.  Thanks for the help!

Asked by scooter2013 5 years ago  |  last reply 5 years ago


accumulator # immediate data ? Answered

Hello , What I need to know  if I want to load the immediate value  into the accumulator accumulator # immediate data accumulator is  8 bit, assume  address of accumulator is  11 10 01 01 temporary register is  8 bit  that hold Immediate data 00 00 00 11 Instruction register example LD A, # 00 00 00 11 this is 2 byte instruction first  byte is 11 10 01 01 second byte is 00 00 00 11 lets assume that first byte is opcode , store into instruction register  This is the first instruction fetch cycle. fetch , decode , and execute how to decode and execute the first byte instruction

Asked by vead 4 years ago  |  last reply 4 years ago


How do I change this code to account for only 1 shift register?

Hi, I am trying to make a midi keyboard as shown https://www.youtube.com/watch?v=lXX8v-ZW6Tk But I am not sure how to change this section of code to account for only one shift register (as seen at 5:35 of the video above): void scanColumn(int colNum) {   digitalWrite(latchPin, LOW);   if(0 <= colNum && colNum <= 7)   {     shiftOut(dataPin, clockPin, MSBFIRST, B11111111); //right sr     shiftOut(dataPin, clockPin, MSBFIRST, bits[colNum]); //left sr   }   else   {     shiftOut(dataPin, clockPin, MSBFIRST, bits[colNum-8]); //right sr     shiftOut(dataPin, clockPin, MSBFIRST, B11111111); //left sr   }   digitalWrite(latchPin, HIGH); } Can someone help please?!

Asked by hbade 3 years ago  |  last reply 3 years ago


What are some media players other than Windows Media Player, that are free and register mp3 players? Answered

I have an Archos 105, and I am tired of Windows Media Player freezing up whenever I plug in my mp3 or rip a cd. I downloaded VLC Media Player, but it doesn't register when I plug in my mp3.

Asked by General Eggs 9 years ago  |  last reply 9 years ago


Report FB Registration Bug

Hello, I've registered with Facebook some time ago and now I've tried to update my personal data when I found out that you have a problem with the link to the personal website of your users profiles. That link, if absent, becomes the facebook page when someone registers with FB, but still you duplicate the "http://http://" part (see photo in attachment).      I am a web developer and that is like my job, so I suppose you've simply hardcoded the first "http://" and then forgot to make the check if the url contains the same "http" string, as in the register-with-facebook case.  Keep up the good work, I love Instructables and I hope my feedback will help you. Igor

Posted by igor.radomirov 3 years ago