Main Site Documentation

Access parallel port as byte/word


#1

Hello FEZ gents,

I am starting to play with my new FEZ Panda II board with different project in mind.

Some may requires interfacing with chips with parallel bus some ADC or some old LCD display like the old LM016.

In my old-tim eprogramming it was more easy to handle byte or word data ports than bits.
It looks like in this NET MF word that most example are using PIN paradigm.

Is there an easy way to use multiple lines as a byte/word and read them in a single instruction without having to read individual pin and shift ?

Probably it would require hardware dependancy such as identifying which pins can be read from a single chip register.

Thanks in advance
Do not hesitate wailing at me if its a FAQ :wink:
br


#2

Welcome to the forum!

Check out ParallelPort

http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/html/c2861753-46d6-24b9-9f5c-b6dc939a1395.htm


#3

Hi Architect

Is the source code of the class available somewhere ?

As it does not seems to have any hardware dependencies (just a list of pins, any pins), I’m just afraid that it is just hiding what I wrote above : reading individual pins and shifting bits.

This I could do it myself without needing a class if I was considering it as efficient.
Reading a 8 bit data-port should be a single instruction.


#4

Trust me. It is efficient. Or write your own code and compare performance.


#5

Yep, was it 300 times faster than doing it in c#? Search the forum and you will find the old thread.


#6

Something like that.


#7

Thanks gents

I believe you are refereing to PROBLEMS WITH PARALLELPORT AND FEZ_RHINO

I’m not sure how I should understand Gus comment :wink:

So I think that I need to experiment a little with it.

By the way the documentation for ParrallelPort would be nicer with a logic timing diagram to explain what I’ve found about in the above thread.

Beside this the doc also state about the preferable write pin but nothing about the read pin.
Does it means that the USBizi implementation is optimized for writing only and not for reading ?

Thanks again.

br


#8

This is not a real parallel port. It is a simulated one that was added for some specific uses, like displays similar to FEZ Touch.