I have to build code for a 3-8 decoder anyone have basic structure?
#include <whatever processor-specific-header-you-need.h> void do_stuff(void) { } int main(void) { for (;;) { do_stuff(); } }
So - what problems do you actually see implementing a 3-to-8 decoder? You have looked at datasheets for one, so you understand how it works? And you have checked how to read pin state information and how to set pin state information? At least looked at all the available sample code? Checked what application notes a number of application engineers have spent time to write, to help people get going with their processors?
output = 1 << (state & 7); // where state is 3-bits (0-7), and output is 8-bits wide
THE 3 BIT INPUT CODE SHOULD APPEAR on p0.2 p0.1 p0.0 out put should appear on one of the eight pins of port one... using h'30 thru h'37
iam completely in the dark about this
Need to look at a Datasheet of the chip you have on the board. And check the mapping of Port 0 and Port 1 pins with the internal signalling of the ports. I was looking at a book on the web maybe inconsistent with the pin locations you are describing.
Also should look at the Schematic of the board to gain information.
Did you just not show up in class, or is the institution/professor inept?
You are using what processor? You have to write this in C or Assembler? You have course work/notes? You have written what so far?