![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi all, I'm working with ADC in PIC16F877. The output is written on PortC in 8 bit.Could I display this output in 3 bit? For example PortC = 11111111 -> PortE = 111 PortC = 01111011 -> PortE = 011 PortC = 00010001 -> PortE = 010 Could I do something like this? (I checked but not worked) Code: movlw B'01111011' xorwf PortC,w btfss status,z movlw B'00000011' movwf PortE Last edited by chilly85; 25th September 2008 at 08:37 AM. | |
| |
| | (permalink) | |
| Quote:
It would be better if you told us whats the need for doing it this way.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | ||
| |
| | (permalink) |
| Hi Eric, I would like to send the output from PIC to computer by parallel port But in parallel port I have only 3 bit (3 pin ) to read this data. That's why I have to change from 8bit to 3 bit | |
| |
| | (permalink) | |
| Quote:
Divide the 255 value by 16, right shifts required. Q1: why have you only got 3 bits available on the PC's paraport.?
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 25th September 2008 at 09:42 AM. | ||
| |
| | (permalink) |
| If you have only 3 bits then send it serial. Use the bits as Enable, Clock & Data. The enable will allow you to recover if a bit is somehow missed when windoze goes of on one of it's tea breaks. Mike. | |
| |
| | (permalink) |
| In the parallel port I have 8 pin for input and output.But I used 5 pins for output already. So I have 3 pins left for input | |
| |
| | (permalink) |
| Do you have a serial port?, that would make everything far simpler for you, on both the PIC and PC sides. | |
| |
| | (permalink) | |
| Quote:
Did you mean that I have to use 3 bits like: 1 bit for Enable, 1 bit for Clock, 1 bit for Data? Could you explain more detail? | ||
| |
| | (permalink) | |
| Quote:
Can you say how you are using the '5 pins'.?
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | ||
| |
| | (permalink) |
| | |
| |
| | (permalink) |
| Data is data, it's up to you what you do with it once it's in the PC - I've no idea what Labview is capable of, but Hyperterminal will read the data and store it in a file. | |
| |
| | (permalink) | |
| Quote:
By the way, I will read more about parallel port configuration. Thanks Eric Last edited by chilly85; 25th September 2008 at 01:01 PM. | ||
| |
| | (permalink) | |
| Quote:
D0 thru D7 are normally configured as PC output pins. They can be configured by the PC's program as inputs if required. It would help if you could post a sketch of what you have connected to the port. EDIT: this table may help.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 25th September 2008 at 01:06 PM. | ||
| |
| | (permalink) | |
| Quote:
I would like to thank for your PIC tutorial online too. I have learn a lot from that. | ||
| |
| | (permalink) |
| The parallel I'm using is bi-directional one. So I can use D0-D7 as input or output | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Analog output PICs | Shohadawy | Micro Controllers | 8 | 26th September 2008 03:53 PM |
| Analog Output | jmmjvg | Micro Controllers | 12 | 23rd July 2007 04:38 PM |
| Sinusoidal steady-State proplem | tinhnho | Electronic Projects Design/Ideas/Reviews | 7 | 8th November 2004 06:09 AM |
| TTL to Analog Display??? | Squintz | General Electronics Chat | 2 | 5th February 2004 02:34 AM |
| Analog output PLC CQM1H problem | goekgoek | General Electronics Chat | 0 | 24th June 2003 09:08 AM |