Simon, Okay, I'm gathering from what you just wrote that there is one relay to control, and it needs to come on when commanded, and off when commanded, all via the PC's parallel port. It should not activate when the PC is first booted up. Further, there will be only one command to turn it on, and another to turn it off, and these commands are not carved in stone as of yet? Am I correct so far? If so, is there going to be anything else connected to the parallel port that needs to be considered, such as a printer? Or is this relay control going to be the only thing connected to the port? If my assesment here is correct, this should only take a day or so to get everything written and working. Let me know. Regards, Jim P.S. I'm in the SW Houston, Texas USA area. > Hello > Thank you for your reply. > Basically the purpose of the pic is to control a relay. > When the pic receive the correct data from the parallel port it will > switch the relay on, Then switch it of again when the parallel ports > send the data to switch off. > > I will program the parallel port directly using 378. > I have noticed that motherboards usually send 378 pins high and then > low on boot up to clear the ports. Some motherboards I have noticed > just send the pins high then low on boot up but others send the pins > high then low individually in a sequence. > This must interfere with the pic. The pic must only switch the relay > when it gets the correct signal from the parallel port and not be > confused and switch at boot up. > > As regards the data from the port it does not matter. You can use > whatever data you want, it does not matter as long as it works and > controls the relay correctly. A small string of data will do, you > choose. > Just let me know what the data must be and I will implement it into my > program. > You can make a small test program to test the port or I can make one > and send it to you. > I have a pic programmer, so you can test it your self then send the > file and diagram to me when you finished. > Where are you based? Just interested. > It must be the parralle port as the serial port is used. > Thank you > Simon > ----- Original Message ----- > From: "James Paul" > To: > Sent: Tuesday, November 06, 2001 2:45 AM > Subject: Re: [PIC]: Help with Pic program to read USB or parrallel port > > >> Simon, >> >> What exactly is the signal that is coming from the parallel port? Is >> it several bits wide? Or a one bit signal? Let me know and I >> believe I can help you out here. I just done something very >> similatr to this recently and can probably reuse some of my code. >> I'll await your response. >> >> Regards, >> >> Jim >> >> >> >> >> >> > Hello >> > I need some one to write and test the PIC program for me. I can >> > program the parralle port my self. >> > Basicly what I need is- >> > >> > This is exactly what I want- >> > The PIC receives a signal (A) from the paralle port to tell the PIC >> > to get ready, next signal (B) tells the PIC to >> >send one of the outputs high. This out put will remain high until the >> >PIC recievs signal (C) then it will go low. >> > The pic will then wait for the next signal (B) and then go high and >> > then low again after the next (C) and continue like this. >> > It only needs to recieve signal (A) when it is first powered up, >> > this is because many motherboards send the parralle port pins high >> > then low diffrently when they first boot up and I did not want to >> > confuse the PIC when the PC first boot up. >> > Or my be you have a better idea how to solve this yourself. >> > I can program the control program to the paralle port myself. >> > >> > As I said I am willing to pay for thgis help. >> > >> > Thank you >> > Simon >> > >> > >> > ----- Original Message ----- >> > From: "Jinx" >> > To: >> > Sent: Tuesday, November 06, 2001 12:20 AM >> > Subject: Re: [PIC]: Help with Pic program to read USB or parrallel >> > port >> > >> > >> >> Do you want to read the data from the port as 8-bit parallel or as >> >> serial ? >> >> >> >> If parallel, connect d0 - d7 of the parallel port to b0 - b7 of the >> >> PIC and use /strobe as the "data ready" signal. If serial, make d0 >> >> the "data out" and d1 as "clock". Two i/o on the PIC are used to >> >> shift data into a PIC RAM location on a "clock" pulse. When this >> >> buffer is full, it's copied (if necessary) into a more permanent >> >> store or used in a test for the "set pin high" operation >> >> >> >> Parallel >> >> ====== >> >> >> >> waitlow >> >> >> >> btfsc strobe ;wait for "data ready" >> >> goto waitlow >> >> >> >> movf portb,w ;move data from portB to RAM >> >> movwf ram_location >> >> >> >> (include test for end-of-data condition, eg data=0, to exit >> >> routine) >> >> >> >> waithi >> >> >> >> btfss strobe ;wait for end of "data ready" signal >> >> goto waithi >> >> goto waitlow ;repeat >> >> >> >> >> >> Serial clock/data are two lines from parallel port >> >> ===== databit is bit0 in a buffer RAM location (eg buffer.0) >> >> >> >> ::: rem In a count of 8 loop for receiving 8 bits. Depending on >> >> which rotation system you use, it may need just a 7 loop >> >> >> >> waitclkhigh >> >> >> >> btfss clock ;wait for clock line to go high >> >> goto waitclkhigh >> >> >> >> waitclklow >> >> >> >> btfsc clock ;and back low >> >> goto waitclklow >> >> >> >> bsf databit ;assume data=1 (for argument's sake) >> >> btfss data ;skip if it actually is >> >> bcf databit >> >> rlf buffer,f ;shift received bits further into the buffer >> >> byte >> >> >> >> ;; test for end-of-loop and skip next instruction if end >> >> >> >> goto waitclkhigh ; repeat >> >> >> >> -- >> >> http://www.piclist.com hint: The PICList is archived three >> >> different ways. See http://www.piclist.com/#archives for details. >> >> >> >> >> >> >> > >> > -- >> > http://www.piclist.com#nomail Going offline? Don't AutoReply us! >> > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body >> >> -- >> http://www.piclist.com#nomail Going offline? Don't AutoReply us! email >> listserv@mitvma.mit.edu with SET PICList DIGEST in the body >> >> >> > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body