OK, so i'm working on this project using the HC11 in expanded mode. I need to figure out two specific things. I need to use Port B for output, and Port C for inputs. For Port B, I want to be able to say PORTB=0xA3, and have the pins on PortB be 1010 0011, as checked with a voltmeter. I thought that PortB doesn't require any initialization or setting prior registers. What am I doing wrong here? And the second part is to set Port C as an input. Could I simply write this: char x; DDRC=0xFF; //set all 8-bits to input x=PORTC; Would this code alone work if I actually connected either a high or low voltage reference to the pins on Port C? thanks in advance, -Arax |
|
Help on input/output on Port C/Port B, respectivley
Started by ●May 21, 2004
Reply by ●May 21, 20042004-05-21
Arax, If you are in expanded mode, Ports B & C supply address/data for the external memory. The code you show would be applicable for single chip modes of operation. Regards, Donald E Haselwood At 09:26 PM 5/21/04, you wrote: >OK, so i'm working on this project using the HC11 in expanded mode. >I need to figure out two specific things. I need to use Port B for >output, and Port C for inputs. > >For Port B, I want to be able to say PORTB=0xA3, and have the pins >on PortB be 1010 0011, as checked with a voltmeter. I thought that >PortB doesn't require any initialization or setting prior registers. >What am I doing wrong here? > >And the second part is to set Port C as an input. Could I simply >write this: >char x; >DDRC=0xFF; //set all 8-bits to input >x=PORTC; > >Would this code alone work if I actually connected either a high or >low voltage reference to the pins on Port C? > >thanks in advance, >-Arax >Yahoo! Groups Links > > |
|
Reply by ●May 21, 20042004-05-21
Although Ports B&C are used for address/data lines which connect to IC's like a latch, can't I connect the outputs to something like LED's(for example) instead? What does the Hc11 care whether I'm really using the ports for address or data lines? What do I have to do to get this to work? I really need the input & output ports. Worst case scenario, I could use Port E to detect my logical inputs. -Arax --- In , Donald E Haselwood <dhaselwood@v...> wrote: > Arax, > > If you are in expanded mode, Ports B & C supply address/data for the > external memory. The code you show would be applicable for single chip > modes of operation. > > Regards, > > Donald E Haselwood > At 09:26 PM 5/21/04, you wrote: > >OK, so i'm working on this project using the HC11 in expanded mode. > >I need to figure out two specific things. I need to use Port B for > >output, and Port C for inputs. > > > >For Port B, I want to be able to say PORTB=0xA3, and have the pins > >on PortB be 1010 0011, as checked with a voltmeter. I thought that > >PortB doesn't require any initialization or setting prior registers. > >What am I doing wrong here? > > > >And the second part is to set Port C as an input. Could I simply > >write this: > >char x; > >DDRC=0xFF; //set all 8-bits to input > >x=PORTC; > > > >Would this code alone work if I actually connected either a high or > >low voltage reference to the pins on Port C? > > > >thanks in advance, > >-Arax > > > > > > > > > > > >Yahoo! Groups Links > > > > > > > > |
Reply by ●May 22, 20042004-05-22
> What do I have to do to get this to work? I really need the input
& > output ports. Worst case scenario, I could use Port E to detect my > logical inputs. 1. I suggest that you start with a thorough review of Section 7, "Parallel Input/Output" of the White Book, or If you haven't read it yet, I suggest that that is a good place to start. The White Book provides you with detailed descriptions of operation of Port B and Port C in both Expanded and Single Chip modes. 2. You seem to have the operation of the HC11 in Singe Chip vs. Expanded modes thoroughly confused. You say that you want to operate in Expanded Mode, yet at the same time you want to use Ports B and C for Single Chip mode type operations???? So which is it?? Do you require Expanded Mode so that you can attach external memory resources?? Or, do you need Ports B and C for discrete I/O operations. Make up your mind cause you ain't gonna get it both ways at the same time. I suggest that you also need a thorough review of Section 3, "Configuration and Modes of Operation" so that you can figure out which mode of operation that you require for your design. > Although Ports B&C are used for address/data lines which connect to > IC's like a latch, can't I connect the outputs to something like > LED's(for example) instead? What does the Hc11 care whether I'm > really using the ports for address or data lines? I can assure you that the 'HC11 doesn't care a bit about what you do or don't attach to Ports B and C in either mode of operation. However, I can also assure you that _you_ will care because when you start the HC11 in Expanded Mode it will drive Ports B and C as if they are being used as memory data and address buses. Again this is all explained to you in the White Book. For example, you haven't bothered to tell us which 'HC11 variant you are using. Depending on which family variant you are using, you may or not have internal memory resources available to provide the required RESET vector to start your program when you come out of RESET and, thus, if no internal memory resource is available to provide a RESET vector, you _must_ attach external memory to ports B and C to even get your program running. Assuming that you can get your program to start running, I can also assure that IT will care very much about what you attach to Ports B and C. As far as the 'HC11 caring, it doesn't! The rule of GIGO applies here! I can think of four ways to operate in expanded mode and still have additional discrete I/O pins available for Input/Output. 1. Attach a PRU similar to the now obsolete MC68HC24 (once again RTFM, see Section 2.9.3 of the White Book). IIRC I have seen notes that indicate that someone is making a clone of that part. Perhaps someone can help identify that part and its source. 2. Attach a System Expansion device such as the old WaferScale (now STM) PSD devices. http://www.st.com/stonline/products/families/memories/psm/index.htm These give you system expansion RAM and ROM plus replacement ports for Port B and C and additional programmable logic functions. Really neat devices. 3. Install some suitable latch and receiver devices to your memory bus (with suitable decoding and strobe logic) to create additional input and output ports that appear to your program as additional memory cells. A Transparent Octal Latch similar to the 74HC373/573 makes a very nice 8 bit output port. Buffers similar to the HC540/541 make good input ports. 4. Use the SPI interface to drive some shift register based input and output expansion ports. See the 74HC165 for input ports and the 74HC794. So . . ., in summary --- RTFM, make up your mind what you really want to do, apply some design skills and move ahead with your design. If that doesn't get you there, then tell us more about your requirements and ask specific questions about what you are stuck on. Best wishes, Bob Smith --- Avoid computer viruses, Practice safe hex --- -- Specializing in small, cost effective embedded control systems -- http://www.smithmachineworks.com/embedprod.html Robert L. (Bob) Smith Smith Machine Works, Inc. 9900 Lumlay Road Richmond, VA 23236 804/745-2608 ----- Original Message ----- From: "araxtypesh" <> To: <> Sent: Friday, May 21, 2004 11:42 PM Subject: [m68HC11] Re: Help on input/output on Port C/Port B, respectivley > Although Ports B&C are used for address/data lines which connect to > IC's like a latch, can't I connect the outputs to something like > LED's(for example) instead? What does the Hc11 care whether I'm > really using the ports for address or data lines? > > What do I have to do to get this to work? I really need the input & > output ports. Worst case scenario, I could use Port E to detect my > logical inputs. > > -Arax > > --- In , Donald E Haselwood <dhaselwood@v...> > wrote: > > Arax, > > > > If you are in expanded mode, Ports B & C supply address/data for > the > > external memory. The code you show would be applicable for single > chip > > modes of operation. > > > > Regards, > > > > Donald E Haselwood > > > > > > At 09:26 PM 5/21/04, you wrote: > > >OK, so i'm working on this project using the HC11 in expanded > mode. > > >I need to figure out two specific things. I need to use Port B for > > >output, and Port C for inputs. > > > > > >For Port B, I want to be able to say PORTB=0xA3, and have the pins > > >on PortB be 1010 0011, as checked with a voltmeter. I thought that > > >PortB doesn't require any initialization or setting prior > registers. > > >What am I doing wrong here? > > > > > >And the second part is to set Port C as an input. Could I simply > > >write this: > > >char x; > > >DDRC=0xFF; //set all 8-bits to input > > >x=PORTC; > > > > > >Would this code alone work if I actually connected either a high > or > > >low voltage reference to the pins on Port C? > > > > > >thanks in advance, > > >-Arax > > > > > > > > > > > > > > > > > >Yahoo! Groups Links > > > > > > > > > > > > -- ------ > Yahoo! Groups Links > > a.. To |
|
Reply by ●May 22, 20042004-05-22
Bob, Personally, I thought RTFM was pretty clear and succinct. Your willingness to provide such a thorough explanation of alternatives in addition is admirable.. I hope the effort pays off. Jim Bob Smith wrote: >Sorry about the typo -- > >>See the 74HC165 for input ports and the 74HC794. >> >> > >should read - > >>See the 74HC165 for input ports and the 74HC794 for output ports. >> >> > > Bob Smith. >--- Avoid computer viruses, Practice safe hex --- > >-- Specializing in small, cost effective > embedded control systems -- > >http://www.smithmachineworks.com/embedprod.html >Robert L. (Bob) Smith >Smith Machine Works, Inc. >9900 Lumlay Road >Richmond, VA 23236 804/745-2608 > >----- Original Message ----- >From: "Bob Smith" <> >To: <> >Sent: Saturday, May 22, 2004 8:18 AM >Subject: Re: [m68HC11] Re: Help on input/output on Port C/Port B, >respectivley > > >>>What do I have to do to get this to work? I really need the input & >>>output ports. Worst case scenario, I could use Port E to detect my >>>logical inputs. >>> >>> >>1. I suggest that you start with a thorough review of Section 7, >> >> >"Parallel >>Input/Output" of the White Book, or If you haven't read it yet, I suggest >>that that is a good place to start. The White Book provides you with >>detailed descriptions of operation of Port B and Port C in both Expanded >> >> >and >>Single Chip modes. >> >>2. You seem to have the operation of the HC11 in Singe Chip vs. Expanded >>modes thoroughly confused. You say that you want to operate in Expanded >>Mode, yet at the same time you want to use Ports B and C for Single Chip >>mode type operations???? So which is it?? Do you require Expanded Mode >> >> >so >>that you can attach external memory resources?? Or, do you need Ports B >> >> >and >>C for discrete I/O operations. Make up your mind cause you ain't gonna >> >> >get >>it both ways at the same time. I suggest that you also need a thorough >>review of Section 3, "Configuration and Modes of Operation" so that you >> >> >can >>figure out which mode of operation that you require for your design. >> >> >> >>>Although Ports B&C are used for address/data lines which connect to >>>IC's like a latch, can't I connect the outputs to something like >>>LED's(for example) instead? What does the Hc11 care whether I'm >>>really using the ports for address or data lines? >>> >>> >>I can assure you that the 'HC11 doesn't care a bit about what you do or >>don't attach to Ports B and C in either mode of operation. However, I can >>also assure you that _you_ will care because when you start the HC11 in >>Expanded Mode it will drive Ports B and C as if they are being used as >>memory data and address buses. Again this is all explained to you in the >>White Book. >> >>For example, you haven't bothered to tell us which 'HC11 variant you are >>using. Depending on which family variant you are using, you may or not >> >> >have >>internal memory resources available to provide the required RESET vector >> >> >to >>start your program when you come out of RESET and, thus, if no internal >>memory resource is available to provide a RESET vector, you _must_ attach >>external memory to ports B and C to even get your program running. >> >> >Assuming >>that you can get your program to start running, I can also assure that IT >>will care very much about what you attach to Ports B and C. >> >>As far as the 'HC11 caring, it doesn't! The rule of GIGO applies here! >> >>I can think of four ways to operate in expanded mode and still have >>additional discrete I/O pins available for Input/Output. >> >>1. Attach a PRU similar to the now obsolete MC68HC24 (once again RTFM, >> >> >see >>Section 2.9.3 of the White Book). IIRC I have seen notes that indicate >> >> >that >>someone is making a clone of that part. Perhaps someone can help identify >>that part and its source. >> >>2. Attach a System Expansion device such as the old WaferScale (now STM) >>PSD devices. >> >>http://www.st.com/stonline/products/families/memories/psm/index.htm >> >>These give you system expansion RAM and ROM plus replacement ports for >> >> >Port >>B and C and additional programmable logic functions. Really neat devices. >> >>3. Install some suitable latch and receiver devices to your memory bus >>(with suitable decoding and strobe logic) to create additional input and >>output ports that appear to your program as additional memory cells. >>A Transparent Octal Latch similar to the 74HC373/573 makes a very nice 8 >> >> >bit >>output port. >>Buffers similar to the HC540/541 make good input ports. >> >>4. Use the SPI interface to drive some shift register based input and >>output expansion ports. >>See the 74HC165 for input ports and the 74HC794. >> >>So . . ., in summary --- RTFM, make up your mind what you really want to >>do, apply some design skills and move ahead with your design. >> >>If that doesn't get you there, then tell us more about your requirements >> >> >and >>ask specific questions about what you are stuck on. >> >> Best wishes, Bob Smith >> >>--- Avoid computer viruses, Practice safe hex --- >> >>-- Specializing in small, cost effective >> embedded control systems -- >> >>http://www.smithmachineworks.com/embedprod.html >> >> >>Robert L. (Bob) Smith >>Smith Machine Works, Inc. >>9900 Lumlay Road >>Richmond, VA 23236 804/745-2608 >> >> >> >>----- Original Message ----- >>From: "araxtypesh" <> >>To: <> >>Sent: Friday, May 21, 2004 11:42 PM >>Subject: [m68HC11] Re: Help on input/output on Port C/Port B, respectivley >> >> >> >> >>>Although Ports B&C are used for address/data lines which connect to >>>IC's like a latch, can't I connect the outputs to something like >>>LED's(for example) instead? What does the Hc11 care whether I'm >>>really using the ports for address or data lines? >>> >>>What do I have to do to get this to work? I really need the input & >>>output ports. Worst case scenario, I could use Port E to detect my >>>logical inputs. >>> >>>-Arax >>> >>> >>> >>>--- In , Donald E Haselwood <dhaselwood@v...> >>>wrote: >>> >>> >>>>Arax, >>>> >>>>If you are in expanded mode, Ports B & C supply address/data for >>>> >>>> >>>the >>> >>> >>>>external memory. The code you show would be applicable for single >>>> >>>> >>>chip >>> >>> >>>>modes of operation. >>>> >>>>Regards, >>>> >>>>Donald E Haselwood >>>> >>>> >>>>At 09:26 PM 5/21/04, you wrote: >>>> >>>> >>>>>OK, so i'm working on this project using the HC11 in expanded >>>>> >>>>> >>>mode. >>> >>> >>>>>I need to figure out two specific things. I need to use Port B for >>>>>output, and Port C for inputs. >>>>> >>>>>For Port B, I want to be able to say PORTB=0xA3, and have the pins >>>>>on PortB be 1010 0011, as checked with a voltmeter. I thought that >>>>>PortB doesn't require any initialization or setting prior >>>>> >>>>> >>>registers. >>> >>> >>>>>What am I doing wrong here? >>>>> >>>>>And the second part is to set Port C as an input. Could I simply >>>>>write this: >>>>>char x; >>>>>DDRC=0xFF; //set all 8-bits to input >>>>>x=PORTC; >>>>> >>>>>Would this code alone work if I actually connected either a high >>>>> >>>>> >>>or >>> >>> >>>>>low voltage reference to the pins on Port C? >>>>> >>>>>thanks in advance, >>>>>-Arax >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>Yahoo! Groups Links >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>> >>> >>> >>> >>> >>> >>> >>> >>-- >>------ >> >> >>>Yahoo! Groups Links >>> >>> a.. To >>> >>> >> >> >> >> >> >> >> >>-- >> >> >------ >>Yahoo! Groups Links >> >> a.. To >> >> >> > > >Yahoo! Groups Links |
|
Reply by ●May 22, 20042004-05-22
Sorry about the typo -- > See the 74HC165 for input ports and the 74HC794. should read - > See the 74HC165 for input ports and the 74HC794 for output ports. Bob Smith. --- Avoid computer viruses, Practice safe hex --- -- Specializing in small, cost effective embedded control systems -- http://www.smithmachineworks.com/embedprod.html Robert L. (Bob) Smith Smith Machine Works, Inc. 9900 Lumlay Road Richmond, VA 23236 804/745-2608 ----- Original Message ----- From: "Bob Smith" <> To: <> Sent: Saturday, May 22, 2004 8:18 AM Subject: Re: [m68HC11] Re: Help on input/output on Port C/Port B, respectivley > > What do I have to do to get this to work? I really need the input & > > output ports. Worst case scenario, I could use Port E to detect my > > logical inputs. > > 1. I suggest that you start with a thorough review of Section 7, "Parallel > Input/Output" of the White Book, or If you haven't read it yet, I suggest > that that is a good place to start. The White Book provides you with > detailed descriptions of operation of Port B and Port C in both Expanded and > Single Chip modes. > > 2. You seem to have the operation of the HC11 in Singe Chip vs. Expanded > modes thoroughly confused. You say that you want to operate in Expanded > Mode, yet at the same time you want to use Ports B and C for Single Chip > mode type operations???? So which is it?? Do you require Expanded Mode so > that you can attach external memory resources?? Or, do you need Ports B and > C for discrete I/O operations. Make up your mind cause you ain't gonna get > it both ways at the same time. I suggest that you also need a thorough > review of Section 3, "Configuration and Modes of Operation" so that you can > figure out which mode of operation that you require for your design. > > > Although Ports B&C are used for address/data lines which connect to > > IC's like a latch, can't I connect the outputs to something like > > LED's(for example) instead? What does the Hc11 care whether I'm > > really using the ports for address or data lines? > > I can assure you that the 'HC11 doesn't care a bit about what you do or > don't attach to Ports B and C in either mode of operation. However, I can > also assure you that _you_ will care because when you start the HC11 in > Expanded Mode it will drive Ports B and C as if they are being used as > memory data and address buses. Again this is all explained to you in the > White Book. > > For example, you haven't bothered to tell us which 'HC11 variant you are > using. Depending on which family variant you are using, you may or not have > internal memory resources available to provide the required RESET vector to > start your program when you come out of RESET and, thus, if no internal > memory resource is available to provide a RESET vector, you _must_ attach > external memory to ports B and C to even get your program running. Assuming > that you can get your program to start running, I can also assure that IT > will care very much about what you attach to Ports B and C. > > As far as the 'HC11 caring, it doesn't! The rule of GIGO applies here! > > I can think of four ways to operate in expanded mode and still have > additional discrete I/O pins available for Input/Output. > > 1. Attach a PRU similar to the now obsolete MC68HC24 (once again RTFM, see > Section 2.9.3 of the White Book). IIRC I have seen notes that indicate that > someone is making a clone of that part. Perhaps someone can help identify > that part and its source. > > 2. Attach a System Expansion device such as the old WaferScale (now STM) > PSD devices. > > http://www.st.com/stonline/products/families/memories/psm/index.htm > > These give you system expansion RAM and ROM plus replacement ports for Port > B and C and additional programmable logic functions. Really neat devices. > > 3. Install some suitable latch and receiver devices to your memory bus > (with suitable decoding and strobe logic) to create additional input and > output ports that appear to your program as additional memory cells. > A Transparent Octal Latch similar to the 74HC373/573 makes a very nice 8 bit > output port. > Buffers similar to the HC540/541 make good input ports. > > 4. Use the SPI interface to drive some shift register based input and > output expansion ports. > See the 74HC165 for input ports and the 74HC794. > > So . . ., in summary --- RTFM, make up your mind what you really want to > do, apply some design skills and move ahead with your design. > > If that doesn't get you there, then tell us more about your requirements and > ask specific questions about what you are stuck on. > > Best wishes, Bob Smith > > --- Avoid computer viruses, Practice safe hex --- > > -- Specializing in small, cost effective > embedded control systems -- > > http://www.smithmachineworks.com/embedprod.html > Robert L. (Bob) Smith > Smith Machine Works, Inc. > 9900 Lumlay Road > Richmond, VA 23236 804/745-2608 > > ----- Original Message ----- > From: "araxtypesh" <> > To: <> > Sent: Friday, May 21, 2004 11:42 PM > Subject: [m68HC11] Re: Help on input/output on Port C/Port B, respectivley > > Although Ports B&C are used for address/data lines which connect to > > IC's like a latch, can't I connect the outputs to something like > > LED's(for example) instead? What does the Hc11 care whether I'm > > really using the ports for address or data lines? > > > > What do I have to do to get this to work? I really need the input & > > output ports. Worst case scenario, I could use Port E to detect my > > logical inputs. > > > > -Arax > > > > > > > > --- In , Donald E Haselwood <dhaselwood@v...> > > wrote: > > > Arax, > > > > > > If you are in expanded mode, Ports B & C supply address/data for > > the > > > external memory. The code you show would be applicable for single > > chip > > > modes of operation. > > > > > > Regards, > > > > > > Donald E Haselwood > > > > > > > > > At 09:26 PM 5/21/04, you wrote: > > > >OK, so i'm working on this project using the HC11 in expanded > > mode. > > > >I need to figure out two specific things. I need to use Port B for > > > >output, and Port C for inputs. > > > > > > > >For Port B, I want to be able to say PORTB=0xA3, and have the pins > > > >on PortB be 1010 0011, as checked with a voltmeter. I thought that > > > >PortB doesn't require any initialization or setting prior > > registers. > > > >What am I doing wrong here? > > > > > > > >And the second part is to set Port C as an input. Could I simply > > > >write this: > > > >char x; > > > >DDRC=0xFF; //set all 8-bits to input > > > >x=PORTC; > > > > > > > >Would this code alone work if I actually connected either a high > > or > > > >low voltage reference to the pins on Port C? > > > > > > > >thanks in advance, > > > >-Arax > > > > > > > > > > > > > > > > > > > > > > > >Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > ------ > > Yahoo! Groups Links > > > > a.. To > > > > > -- ------ > Yahoo! Groups Links > > a.. To |
|
Reply by ●May 22, 20042004-05-22
Thanks for the kind words. I also wonder sometimes if the message gets across, but I have derived many benefits from this fine collection of MCU folks that I try to give back as much as I can as circumstances allow. Perhaps the original poster won't get the message, but it may help others on the list. Best wishes, Bob Smith --- Avoid computer viruses, Practice safe hex --- -- Specializing in small, cost effective embedded control systems -- http://www.smithmachineworks.com/embedprod.html Robert L. (Bob) Smith Smith Machine Works, Inc. 9900 Lumlay Road Richmond, VA 23236 804/745-2608 ----- Original Message ----- From: "Jim Peterson" <> To: <> Sent: Saturday, May 22, 2004 8:32 AM Subject: Re: [m68HC11] Re: Help on input/output on Port C/Port B, respectivley > Bob, > Personally, I thought RTFM was pretty clear and succinct. Your > willingness to provide such a thorough explanation of alternatives in > addition is admirable.. > > I hope the effort pays off. > Jim > > Bob Smith wrote: > > >Sorry about the typo -- > > > > > > > >>See the 74HC165 for input ports and the 74HC794. > >> > >> > > > >should read - > > > > > > > >>See the 74HC165 for input ports and the 74HC794 for output ports. > >> > >> > > > > Bob Smith. > > > > > >--- Avoid computer viruses, Practice safe hex --- > > > >-- Specializing in small, cost effective > > embedded control systems -- > > > >http://www.smithmachineworks.com/embedprod.html > > > > > >Robert L. (Bob) Smith > >Smith Machine Works, Inc. > >9900 Lumlay Road > >Richmond, VA 23236 804/745-2608 > > > > > > > >----- Original Message ----- > >From: "Bob Smith" <> > >To: <> > >Sent: Saturday, May 22, 2004 8:18 AM > >Subject: Re: [m68HC11] Re: Help on input/output on Port C/Port B, > >respectivley > > > > > > > > > >>>What do I have to do to get this to work? I really need the input & > >>>output ports. Worst case scenario, I could use Port E to detect my > >>>logical inputs. > >>> > >>> > >>1. I suggest that you start with a thorough review of Section 7, > >> > >> > >"Parallel > > > > > >>Input/Output" of the White Book, or If you haven't read it yet, I suggest > >>that that is a good place to start. The White Book provides you with > >>detailed descriptions of operation of Port B and Port C in both Expanded > >> > >> > >and > > > > > >>Single Chip modes. > >> > >>2. You seem to have the operation of the HC11 in Singe Chip vs. Expanded > >>modes thoroughly confused. You say that you want to operate in Expanded > >>Mode, yet at the same time you want to use Ports B and C for Single Chip > >>mode type operations???? So which is it?? Do you require Expanded Mode > >> > >> > >so > > > > > >>that you can attach external memory resources?? Or, do you need Ports B > >> > >> > >and > > > > > >>C for discrete I/O operations. Make up your mind cause you ain't gonna > >> > >> > >get > > > > > >>it both ways at the same time. I suggest that you also need a thorough > >>review of Section 3, "Configuration and Modes of Operation" so that you > >> > >> > >can > > > > > >>figure out which mode of operation that you require for your design. > >> > >> > >> > >>>Although Ports B&C are used for address/data lines which connect to > >>>IC's like a latch, can't I connect the outputs to something like > >>>LED's(for example) instead? What does the Hc11 care whether I'm > >>>really using the ports for address or data lines? > >>> > >>> > >>I can assure you that the 'HC11 doesn't care a bit about what you do or > >>don't attach to Ports B and C in either mode of operation. However, I can > >>also assure you that _you_ will care because when you start the HC11 in > >>Expanded Mode it will drive Ports B and C as if they are being used as > >>memory data and address buses. Again this is all explained to you in the > >>White Book. > >> > >>For example, you haven't bothered to tell us which 'HC11 variant you are > >>using. Depending on which family variant you are using, you may or not > >> > >> > >have > > > > > >>internal memory resources available to provide the required RESET vector > >> > >> > >to > > > > > >>start your program when you come out of RESET and, thus, if no internal > >>memory resource is available to provide a RESET vector, you _must_ attach > >>external memory to ports B and C to even get your program running. > >> > >> > >Assuming > > > > > >>that you can get your program to start running, I can also assure that IT > >>will care very much about what you attach to Ports B and C. > >> > >>As far as the 'HC11 caring, it doesn't! The rule of GIGO applies here! > >> > >>I can think of four ways to operate in expanded mode and still have > >>additional discrete I/O pins available for Input/Output. > >> > >>1. Attach a PRU similar to the now obsolete MC68HC24 (once again RTFM, > >> > >> > >see > > > > > >>Section 2.9.3 of the White Book). IIRC I have seen notes that indicate > >> > >> > >that > > > > > >>someone is making a clone of that part. Perhaps someone can help identify > >>that part and its source. > >> > >>2. Attach a System Expansion device such as the old WaferScale (now STM) > >>PSD devices. > >> > >>http://www.st.com/stonline/products/families/memories/psm/index.htm > >> > >>These give you system expansion RAM and ROM plus replacement ports for > >> > >> > >Port > > > > > >>B and C and additional programmable logic functions. Really neat devices. > >> > >>3. Install some suitable latch and receiver devices to your memory bus > >>(with suitable decoding and strobe logic) to create additional input and > >>output ports that appear to your program as additional memory cells. > >>A Transparent Octal Latch similar to the 74HC373/573 makes a very nice 8 > >> > >> > >bit > > > > > >>output port. > >>Buffers similar to the HC540/541 make good input ports. > >> > >>4. Use the SPI interface to drive some shift register based input and > >>output expansion ports. > >>See the 74HC165 for input ports and the 74HC794. > >> > >>So . . ., in summary --- RTFM, make up your mind what you really want to > >>do, apply some design skills and move ahead with your design. > >> > >>If that doesn't get you there, then tell us more about your requirements > >> > >> > >and > > > > > >>ask specific questions about what you are stuck on. > >> > >> Best wishes, Bob Smith > >> > >>--- Avoid computer viruses, Practice safe hex --- > >> > >>-- Specializing in small, cost effective > >> embedded control systems -- > >> > >>http://www.smithmachineworks.com/embedprod.html > >> > >> > >>Robert L. (Bob) Smith > >>Smith Machine Works, Inc. > >>9900 Lumlay Road > >>Richmond, VA 23236 804/745-2608 > >> > >> > >> > >>----- Original Message ----- > >>From: "araxtypesh" <> > >>To: <> > >>Sent: Friday, May 21, 2004 11:42 PM > >>Subject: [m68HC11] Re: Help on input/output on Port C/Port B, respectivley > >> > >> > >> > >> > >>>Although Ports B&C are used for address/data lines which connect to > >>>IC's like a latch, can't I connect the outputs to something like > >>>LED's(for example) instead? What does the Hc11 care whether I'm > >>>really using the ports for address or data lines? > >>> > >>>What do I have to do to get this to work? I really need the input & > >>>output ports. Worst case scenario, I could use Port E to detect my > >>>logical inputs. > >>> > >>>-Arax > >>> > >>> > >>> > >>>--- In , Donald E Haselwood <dhaselwood@v...> > >>>wrote: > >>> > >>> > >>>>Arax, > >>>> > >>>>If you are in expanded mode, Ports B & C supply address/data for > >>>> > >>>> > >>>the > >>> > >>> > >>>>external memory. The code you show would be applicable for single > >>>> > >>>> > >>>chip > >>> > >>> > >>>>modes of operation. > >>>> > >>>>Regards, > >>>> > >>>>Donald E Haselwood > >>>> > >>>> > >>>>At 09:26 PM 5/21/04, you wrote: > >>>> > >>>> > >>>>>OK, so i'm working on this project using the HC11 in expanded > >>>>> > >>>>> > >>>mode. > >>> > >>> > >>>>>I need to figure out two specific things. I need to use Port B for > >>>>>output, and Port C for inputs. > >>>>> > >>>>>For Port B, I want to be able to say PORTB=0xA3, and have the pins > >>>>>on PortB be 1010 0011, as checked with a voltmeter. I thought that > >>>>>PortB doesn't require any initialization or setting prior > >>>>> > >>>>> > >>>registers. > >>> > >>> > >>>>>What am I doing wrong here? > >>>>> > >>>>>And the second part is to set Port C as an input. Could I simply > >>>>>write this: > >>>>>char x; > >>>>>DDRC=0xFF; //set all 8-bits to input > >>>>>x=PORTC; > >>>>> > >>>>>Would this code alone work if I actually connected either a high > >>>>> > >>>>> > >>>or > >>> > >>> > >>>>>low voltage reference to the pins on Port C? > >>>>> > >>>>>thanks in advance, > >>>>>-Arax > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>Yahoo! Groups Links > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>-- > >>------ > >> > >> > >>>Yahoo! Groups Links > >>> > >>> a.. To > > > > > >>> > >>> > >> > >> > >> > >> > >> > >> > >> > >>-- > >> > >> > >------ > > > > > >>Yahoo! Groups Links > >> > >> a.. To > >> > >> > >> > >> > > > > > > > > > > > > > >Yahoo! Groups Links > > > > > > > > > > > > > > > > -- ------ > Yahoo! Groups Links > > a.. To |
Reply by ●May 22, 20042004-05-22
I have the CMM11E1 version of the HC11 which only works in expanded mode(no single chip available). What I want is to use Ports B & C for I/O operations. Your third solution for using the 74373 latch is what I originally had in mind, but don't know how to start implementing it for I/O. Whats's confusing me also is that why do I need to use a latch if I'm going to use Port B only for ouput and Port C only for input? When the Hc11 sends out a memory address on its Port B, can't I just use those outputs directly and drive whatever i'm going to drive? I'm not switching the Port from addressing to data mode, so why need a latch? I hope I was able to make my problem clear. Thanks for the replys -Arax --- In , "Bob Smith" <bobsmith5@v...> wrote: > > What do I have to do to get this to work? I really need the input & > > output ports. Worst case scenario, I could use Port E to detect my > > logical inputs. > > 1. I suggest that you start with a thorough review of Section 7, "Parallel > Input/Output" of the White Book, or If you haven't read it yet, I suggest > that that is a good place to start. The White Book provides you with > detailed descriptions of operation of Port B and Port C in both Expanded and > Single Chip modes. > > 2. You seem to have the operation of the HC11 in Singe Chip vs. Expanded > modes thoroughly confused. You say that you want to operate in Expanded > Mode, yet at the same time you want to use Ports B and C for Single Chip > mode type operations???? So which is it?? Do you require Expanded Mode so > that you can attach external memory resources?? Or, do you need Ports B and > C for discrete I/O operations. Make up your mind cause you ain't gonna get > it both ways at the same time. I suggest that you also need a thorough > review of Section 3, "Configuration and Modes of Operation" so that you can > figure out which mode of operation that you require for your design. > > > Although Ports B&C are used for address/data lines which connect to > > IC's like a latch, can't I connect the outputs to something like > > LED's(for example) instead? What does the Hc11 care whether I'm > > really using the ports for address or data lines? > > I can assure you that the 'HC11 doesn't care a bit about what you do or > don't attach to Ports B and C in either mode of operation. However, I can > also assure you that _you_ will care because when you start the HC11 in > Expanded Mode it will drive Ports B and C as if they are being used as > memory data and address buses. Again this is all explained to you in the > White Book. > > For example, you haven't bothered to tell us which 'HC11 variant you are > using. Depending on which family variant you are using, you may or not have > internal memory resources available to provide the required RESET vector to > start your program when you come out of RESET and, thus, if no internal > memory resource is available to provide a RESET vector, you _must_ attach > external memory to ports B and C to even get your program running. Assuming > that you can get your program to start running, I can also assure that IT > will care very much about what you attach to Ports B and C. > > As far as the 'HC11 caring, it doesn't! The rule of GIGO applies here! > > I can think of four ways to operate in expanded mode and still have > additional discrete I/O pins available for Input/Output. > > 1. Attach a PRU similar to the now obsolete MC68HC24 (once again RTFM, see > Section 2.9.3 of the White Book). IIRC I have seen notes that indicate that > someone is making a clone of that part. Perhaps someone can help identify > that part and its source. > > 2. Attach a System Expansion device such as the old WaferScale (now STM) > PSD devices. > > http://www.st.com/stonline/products/families/memories/psm/index.htm > > These give you system expansion RAM and ROM plus replacement ports for Port > B and C and additional programmable logic functions. Really neat devices. > > 3. Install some suitable latch and receiver devices to your memory bus > (with suitable decoding and strobe logic) to create additional input and > output ports that appear to your program as additional memory cells. > A Transparent Octal Latch similar to the 74HC373/573 makes a very nice 8 bit > output port. > Buffers similar to the HC540/541 make good input ports. > > 4. Use the SPI interface to drive some shift register based input and > output expansion ports. > See the 74HC165 for input ports and the 74HC794. > > So . . ., in summary --- RTFM, make up your mind what you really want to > do, apply some design skills and move ahead with your design. > > If that doesn't get you there, then tell us more about your requirements and > ask specific questions about what you are stuck on. > > Best wishes, Bob Smith > > --- Avoid computer viruses, Practice safe hex --- > > -- Specializing in small, cost effective > embedded control systems -- > > http://www.smithmachineworks.com/embedprod.html > Robert L. (Bob) Smith > Smith Machine Works, Inc. > 9900 Lumlay Road > Richmond, VA 23236 804/745-2608 > > bobsmith5@v... > > ----- Original Message ----- > From: "araxtypesh" <arax@m...> > To: <> > Sent: Friday, May 21, 2004 11:42 PM > Subject: [m68HC11] Re: Help on input/output on Port C/Port B, respectivley > > > > Although Ports B&C are used for address/data lines which connect to > > IC's like a latch, can't I connect the outputs to something like > > LED's(for example) instead? What does the Hc11 care whether I'm > > really using the ports for address or data lines? > > > > What do I have to do to get this to work? I really need the input & > > output ports. Worst case scenario, I could use Port E to detect my > > logical inputs. > > > > -Arax > > > > > > > > --- In , Donald E Haselwood <dhaselwood@v...> > > wrote: > > > Arax, > > > > > > If you are in expanded mode, Ports B & C supply address/data for > > the > > > external memory. The code you show would be applicable for single > > chip > > > modes of operation. > > > > > > Regards, > > > > > > Donald E Haselwood > > > > > > > > > At 09:26 PM 5/21/04, you wrote: > > > >OK, so i'm working on this project using the HC11 in expanded > > mode. > > > >I need to figure out two specific things. I need to use Port B for > > > >output, and Port C for inputs. > > > > > > > >For Port B, I want to be able to say PORTB=0xA3, and have the pins > > > >on PortB be 1010 0011, as checked with a voltmeter. I thought that > > > >PortB doesn't require any initialization or setting prior > > registers. > > > >What am I doing wrong here? > > > > > > > >And the second part is to set Port C as an input. Could I simply > > > >write this: > > > >char x; > > > >DDRC=0xFF; //set all 8-bits to input > > > >x=PORTC; > > > > > > > >Would this code alone work if I actually connected either a high > > or > > > >low voltage reference to the pins on Port C? > > > > > > > >thanks in advance, > > > >-Arax > > > > > > > > > > > > > > > > > > > > > > > >Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ----------------------------- --------- > ------ > > Yahoo! Groups Links > > > > a.. To > > > > |
|
Reply by ●May 22, 20042004-05-22
--- In , "araxtypesh" <arax@m...> wrote: > I have the CMM11E1 version of the HC11 which only works in > expanded mode(no single chip available). What I want is to use > Ports B & C for I/O operations. > > Your third solution for using the 74373 latch is what I originally > had in mind, but don't know how to start implementing it for I/O. > > Whats's confusing me also is that why do I need to use a latch if > I'm going to use Port B only for ouput and Port C only for input? > When the Hc11 sends out a memory address on its Port B, can't I > just use those outputs directly and drive whatever i'm going to > drive? I'm not switching the Port from addressing to data mode, > so why need a latch? The 68HC11 Reference Manual, commonly referred to here as the "White Book", discusses how Port B and Port C are 'taken over' by the memory access logic in Chapter 7 - specifically, Chapters 7.2, 7.3 and 7.4. You can download a PDF of this manual from the Motorola website. I cannot emphasize enough how important it is that you get this reference and use it. When the HC11 is configured to use expanded bus mode, logic inside the HC11 totally disassociates the port I/O logic for ports B & C from the I/O pins, and switches in memory-bus-control logic in its place. The logic associated with the I/O functions of ports B and C - the various control registers, input/output buffers and such is simply not available in expanded mode - it is logically disconnected from the port B/C I/O pins. Ports B and C are simply not available in expanded mode. Trust me on this. When the bus-control logic is logically attached to the PB/PC pins, the data present on these pins will be constantly changing. The HC11 will use the PB pins to output address information, which will be constantly changing as the device generates addressing information to read opcodes and read/write data from/to external memory. The same applies to the PC I/O pins - data read or written from external memory will be asserted onto these lines, and will be constantly changing. Now, consider what would happen if you were to, say, tie a simple toggle switch (with the switching poles attached to Vss and Vdd) to, say, the PC0 'input'. If the switch was set to assert a low (Vss) level on PC0, it would override the write-output data that the HC11 would place on PC0 when it attempted to write to memory, or would override the level that a memory device (RAM or ROM or whatever) would attempt to place on the bus during a read operation. You would effectively be corrupting the LSbit of ALL data read or written from/to memory, including the instruction opcodes being read from memory, which would rapidly result in your program crashing. Furthermore, since you would be short-circuting the output drivers of the HC11 and/or memory devices to Vss (or Vdd), you would likely damage the pin drivers of these devices. Remember, when the HC11 is configured for expanded (external memory bus) mode, Port C is a BIDIRECTIONAL data bus, and IGNORES the setting of the DDRC register! Buffer/latch devices like the 74HC373 can, with appropriate support logic, made to look like a memory device on the bus. Let us consider, for this example, a 74HC373 device being used as a memory- mapped input port. You would connect the Q-outputs to the Port C (data bus) lines, and connect the D-inputs to your signal sources. At first, this would appear to be no better than connecting your input sources directly to the Port C/data bus lines - you would experience the same problems I mentioned above with the switch example - but for one important difference. The 74HC373 device has a 'output enable' pin - which serves a function much like the 'chip select' input on a memory device. When the output enable pin on a 74HC373 is in the inactive state, the Q-outputs are placed in a 'high impedance' state - in effect, the output drivers on these pins are switched off, logically disconnecting the outputs from the Port C data bus. When the output enable pin on the '373 is placed in the active state (low), the Q-output lines are turned on. Assuming the latch enable input on the '373 is in the active state, the levels present on the D-inputs will be reflected on the Q- outputs tied to the Port C data bus. To use a device like the '373 as a memory-mapped input port, you need to add some address decoding logic that 'looks at' the address outputs and generates a active-low output enable signal only when the (range of) addresses that you reserve for the input buffer are presented on the bus. Since you only want to activate the outputs of the buffer when you are doing a READ operation, you also need to incorporate the 'E' and 'R/-W' signals into this logic. I won't go into the low-level details as to how to do address decoding here (I will discuss it in a seperate message if you like) but suffice to say that such logic is necessary to make the techniques I and others have discussed here to work. For a memory-mapped output port, a true LATCH is NECESSARY because the state of the data bus is in constant flux, as I mentioned above. You need to LATCH the state of the Port C data bus when it outputs the data intended for 'your' output port. The latch will retain the data you write (much in the same way that a RAM will retain the data you write to it) when the latch-enable input is driven active by the address decoding logic mentioned earlier. For various reasons I won't go into right now, you need to use a edge- triggered latch, such as the 74HC374/574, for this purpose. The D- inputs are attached to the Port C data bus, the Q-outputs are your 'port outputs', the latch-enable input is attached to your address decoding logic, and the output-enable line is permanantly tied to Vss (low logic level). Many, but not all, evaluation boards for the HC11 will incorporate some address decoding logic for you that will simplify the task of adding peripheral logic such as the latches and buffers I have discussed here, in addition to more complex peripheral devices. If your board does not have such logic already built in, it can be realized with two or three inexpensive 74HC-series devices. If you like, I can discuss in another message the devices you need and how they should be connected. It would be helpful to all of us if you could give us more details on the board you are using - who makes it, what model is it, and does the documentation that comes with it mention anything about providing 'address decoding' or 'chip selects' for external peripherals. If the manufacturer has a website, you should provide the URL for that as well. One last note: If you do not want to deal with the complexities involved to 'memory map' a buffer/latch to provide I/O lines, an alternative approach (that has been breifly discussed in prior messages) would be to use a few of the I/O lines you do have available (on ports A, D or E) as a serial interface in conjunction with devices such as the 74HC165, 74HC299, or 74HC595. The serially- driven approach to I/O is somewhat easier to implement on the hardware side, but has the drawback of being more complex and time- intensive on the software side. If high-speed I/O is not needed, you might find this approach easier. Let me know if you would like me to discuss this alternative technique. |
Reply by ●May 24, 20042004-05-24
> I have the CMM11E1 version of the HC11 I have never heard of a "CMM11E1 version of the HC11 device". Please explain. Who makes it? What is it? How does it differ from the MC68HC11E1?? >which only works in expanded mode(no single chip available). I can see no reason that an MC68HC11E1 will not work in single chip mode unless _you_ have to have external memory resources attached to the chip. IIRC, your original application program would fit in EEPROM. Is that no longer true. > What I want is to use Ports B & C for I/O operations. Please explain what what makes you think that the E1 cannot be operated in single chip mode with ports B and C functioning as normal discrete I/O ports which will accomplish your objective. Be specific in your explanation and please cite references that verify your claim. IIRC, this thread was about operating the MC68HC11E1 in expanded mode with external memory resources attached. So do you or do you _NOT_ have external memory attached to the chip?? If you do not have external memory attached, why do you insist on operating in expanded mode? > > Your third solution for using the 74373 latch is what I originally > had in mind, but don't know how to start implementing it for I/O. > There is an example of how to decode the address and data buses of the 'HC11 shown in Figure 2-22, "Basic Expanded Mode Connections" Just think of your 74HC540 input buffer as a one byte EPROM device. (Actually you can make multiple ports if you decode the low order address bits. You CANNOT operate without the gated buffer because of the I/O contention that will result when the bus is in write mode. In a similar manner, just think of 74HC373 (or equivalent) latches as single byte RAM devices. > Whats's confusing me also is that why do I need to use a latch if > I'm going to use Port B only for ouput and Port C only for input? In expanded mode you CANNOT use these ports as simple data ports as in single chip mode. In expanded mode Port C is a multiplexed address and data bus and Port B outputs the high order address bus byte. > When the HC11 sends out a memory address on its Port B, can't I just > use those outputs directly and drive whatever i'm going to drive? > I'm not switching the Port from addressing to data mode, so why need > a latch? PLEASE read Section 7 of the White Book. You will discover that the data on Port B changes almost every CPU clock cycle. Your LEDs will flash on for about one microsecond and then the data pattern will change to whatever the next address that the CPU needs to access. > > I hope I was able to make my problem clear. Thanks for the replys > I'm sorry, you now have me thoroughly confused by your references to a CMM11E1 and the proposition that MC68HC11E1s cannot operate in single chip mode. So what is it that you are really trying to do and what is your proposed system configuration. Here are some more suggestions: 1. If you _require_ external memory resources, then operate in expanded mode (using the examples given in the White Book) and select one of the four solutions I gave you previously. Were it my project I would use the SPI interface to create additional I/O ports. 2. If _don't_ require external memory resources, then just start your E1 in special bootstrap mode (which is a single chip moe) and get on with it. 3. Quit messing around with trying to bend the 'E1 devices to something they were not intended to do. A much better solution would be to install a MC68HC711E9 and simply run it in single chip mode. That is the device that Motorola designed to address your application. So use it as intended and get on with your design. Please, help me help you. Bob Smith > -Arax > --- Avoid computer viruses, Practice safe hex --- -- Specializing in small, cost effective embedded control systems -- http://www.smithmachineworks.com/embedprod.html Robert L. (Bob) Smith Smith Machine Works, Inc. 9900 Lumlay Road Richmond, VA 23236 804/745-2608 ----- Original Message ----- From: "araxtypesh" <> To: <> Sent: Saturday, May 22, 2004 5:04 PM Subject: [m68HC11] Re: Help on input/output on Port C/Port B, respectivley > I have the CMM11E1 version of the HC11 which only works in expanded > mode(no single chip available). What I want is to use Ports B & C > for I/O operations. > > Your third solution for using the 74373 latch is what I originally > had in mind, but don't know how to start implementing it for I/O. > > Whats's confusing me also is that why do I need to use a latch if > I'm going to use Port B only for ouput and Port C only for input? > When the Hc11 sends out a memory address on its Port B, can't I just > use those outputs directly and drive whatever i'm going to drive? > I'm not switching the Port from addressing to data mode, so why need > a latch? > > I hope I was able to make my problem clear. Thanks for the replys > > -Arax > --- In , "Bob Smith" <bobsmith5@v...> wrote: > > > What do I have to do to get this to work? I really need the > input & > > > output ports. Worst case scenario, I could use Port E to detect > my > > > logical inputs. > > > > 1. I suggest that you start with a thorough review of Section > 7, "Parallel > > Input/Output" of the White Book, or If you haven't read it yet, I > suggest > > that that is a good place to start. The White Book provides you > with > > detailed descriptions of operation of Port B and Port C in both > Expanded and > > Single Chip modes. > > > > 2. You seem to have the operation of the HC11 in Singe Chip vs. > Expanded > > modes thoroughly confused. You say that you want to operate in > Expanded > > Mode, yet at the same time you want to use Ports B and C for > Single Chip > > mode type operations???? So which is it?? Do you require > Expanded Mode so > > that you can attach external memory resources?? Or, do you need > Ports B and > > C for discrete I/O operations. Make up your mind cause you ain't > gonna get > > it both ways at the same time. I suggest that you also need a > thorough > > review of Section 3, "Configuration and Modes of Operation" so > that you can > > figure out which mode of operation that you require for your > design. > > > > > Although Ports B&C are used for address/data lines which connect > to > > > IC's like a latch, can't I connect the outputs to something like > > > LED's(for example) instead? What does the Hc11 care whether I'm > > > really using the ports for address or data lines? > > > > I can assure you that the 'HC11 doesn't care a bit about what you > do or > > don't attach to Ports B and C in either mode of operation. > However, I can > > also assure you that _you_ will care because when you start the > HC11 in > > Expanded Mode it will drive Ports B and C as if they are being > used as > > memory data and address buses. Again this is all explained to you > in the > > White Book. > > > > For example, you haven't bothered to tell us which 'HC11 variant > you are > > using. Depending on which family variant you are using, you may > or not have > > internal memory resources available to provide the required RESET > vector to > > start your program when you come out of RESET and, thus, if no > internal > > memory resource is available to provide a RESET vector, you _must_ > attach > > external memory to ports B and C to even get your program > running. Assuming > > that you can get your program to start running, I can also assure > that IT > > will care very much about what you attach to Ports B and C. > > > > As far as the 'HC11 caring, it doesn't! The rule of GIGO applies > here! > > > > I can think of four ways to operate in expanded mode and still have > > additional discrete I/O pins available for Input/Output. > > > > 1. Attach a PRU similar to the now obsolete MC68HC24 (once again > RTFM, see > > Section 2.9.3 of the White Book). IIRC I have seen notes that > indicate that > > someone is making a clone of that part. Perhaps someone can help > identify > > that part and its source. > > > > 2. Attach a System Expansion device such as the old WaferScale > (now STM) > > PSD devices. > > > > http://www.st.com/stonline/products/families/memories/psm/index.htm > > > > These give you system expansion RAM and ROM plus replacement ports > for Port > > B and C and additional programmable logic functions. Really neat > devices. > > > > 3. Install some suitable latch and receiver devices to your > memory bus > > (with suitable decoding and strobe logic) to create additional > input and > > output ports that appear to your program as additional memory > cells. > > A Transparent Octal Latch similar to the 74HC373/573 makes a very > nice 8 bit > > output port. > > Buffers similar to the HC540/541 make good input ports. > > > > 4. Use the SPI interface to drive some shift register based input > and > > output expansion ports. > > See the 74HC165 for input ports and the 74HC794. > > > > So . . ., in summary --- RTFM, make up your mind what you really > want to > > do, apply some design skills and move ahead with your design. > > > > If that doesn't get you there, then tell us more about your > requirements and > > ask specific questions about what you are stuck on. > > > > Best wishes, Bob Smith > > > > --- Avoid computer viruses, Practice safe hex --- > > > > -- Specializing in small, cost effective > > embedded control systems -- > > > > http://www.smithmachineworks.com/embedprod.html > > > > > > Robert L. (Bob) Smith > > Smith Machine Works, Inc. > > 9900 Lumlay Road > > Richmond, VA 23236 804/745-2608 > > > > bobsmith5@v... > > > > ----- Original Message ----- > > From: "araxtypesh" <arax@m...> > > To: <> > > Sent: Friday, May 21, 2004 11:42 PM > > Subject: [m68HC11] Re: Help on input/output on Port C/Port B, > respectivley > > > > > > > Although Ports B&C are used for address/data lines which connect > to > > > IC's like a latch, can't I connect the outputs to something like > > > LED's(for example) instead? What does the Hc11 care whether I'm > > > really using the ports for address or data lines? > > > > > > What do I have to do to get this to work? I really need the > input & > > > output ports. Worst case scenario, I could use Port E to detect > my > > > logical inputs. > > > > > > -Arax > > > > > > > > > > > > --- In , Donald E Haselwood > <dhaselwood@v...> > > > wrote: > > > > Arax, > > > > > > > > If you are in expanded mode, Ports B & C supply address/data > for > > > the > > > > external memory. The code you show would be applicable for > single > > > chip > > > > modes of operation. > > > > > > > > Regards, > > > > > > > > Donald E Haselwood > > > > > > > > > > > > At 09:26 PM 5/21/04, you wrote: > > > > >OK, so i'm working on this project using the HC11 in expanded > > > mode. > > > > >I need to figure out two specific things. I need to use Port > B for > > > > >output, and Port C for inputs. > > > > > > > > > >For Port B, I want to be able to say PORTB=0xA3, and have the > pins > > > > >on PortB be 1010 0011, as checked with a voltmeter. I thought > that > > > > >PortB doesn't require any initialization or setting prior > > > registers. > > > > >What am I doing wrong here? > > > > > > > > > >And the second part is to set Port C as an input. Could I > simply > > > > >write this: > > > > >char x; > > > > >DDRC=0xFF; //set all 8-bits to input > > > > >x=PORTC; > > > > > > > > > >Would this code alone work if I actually connected either a > high > > > or > > > > >low voltage reference to the pins on Port C? > > > > > > > > > >thanks in advance, > > > > >-Arax > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ----------------------------- > --------- > > ------ > > > Yahoo! Groups Links > > > > > > a.. To > > > > > > -- ------ > Yahoo! Groups Links > > a.. To |