What does a parallel port on an embedded system look like? -


this may stupid question it's been confusing me. i've been watching videos on embedded systems , they're talking parallel ports, data, direction , amount used. understand ports connected wires feed other parts of system or external devices. confused because lecture watched says control single led require 1 bit 1 port.

my question is, parallel port on embedded system , how connect own devices board? (say made device sent 4 random bits port)

edit: have started learning might have missed vital piece of information tie altogether. don't understand how can have 8 bit port , use 1 bit of it.

firstly, should know term "parallel port" can refer wide variety of connectors. people use phrase describe 25-pin connectors found on older pcs peripherals printers or modems, can have more or fewer pins that. wikipedia article on them has examples.

the led example means if have 8-bit parallel port, have 8 pins, need connect 1 of pins led able control it. other pins don't disappear or strange, can left unconnected. rest of pins either ones or zeros well, but doesn't matter because they're not connected. writing "1" or "0" 1 connected pin drive voltage high or low, turn led on or off, depending on how it's connected. can write whatever want other pins, , won't affect operation of led (though safest connect them ground , write "0"s them).

here's example:

// assume reg memory-mapped register controls 8-bit output // port. port connected 8-pin parallel connector. pin 0 // connected led turned on when "1" written  // bit 0 (the least-significant bit) of reg  reg = 0x01 // write "1" bit 0, "0"s else 

i think confusion stems phrase "we need 1 bit", , think it's justified confusion. mean need control 1 bit on port corresponds our led able manipulate led, in reality, can't write 1 bit @ time, it's bit (ha!) misleading. (probably) won't find registers smaller 8-bits anymore, do have read/write registers in whole bytes @ time, can mask off bits don't care about, or read-modify-write cycles avoid changing bits don't intend to.