Genius!
I had dabbled with the port settings but was stabbing in the dark.
If the T0IF error text does occur it's gobbledygook but it doesn't occur often.
Thanks
Type: Posts; User: macinug; Keyword(s):
Genius!
I had dabbled with the port settings but was stabbing in the dark.
If the T0IF error text does occur it's gobbledygook but it doesn't occur often.
Thanks
Thanks Darrel. This worked for me but...
When I add it to my code which initiates movement of the thing I wish to measure I get the timeout error T0IF at the 101st reading. I've tried...
Thanks.
I will create an array before I send it to the PC. It's important that the sampling rate is 1ms.
Now to find out how to set up a 1000 element byte array!
Hi again,
Can anyone give me code for reading adcin at exactly 1ms intervals for 1 second. I'm using a 20Mhz OSC on a 16F876. The code below is too slow presumeably as I haven't allowed for the...
Thanks for the quick replies.
After trying the PBP Serial Comm I realised I had not configured the Port correctly in VB ie Was 19200,N,8,1 should be 19200,E,7,1 as in the PBP code config.
Simple...
Here is the PIC code. I am sending the data as a string from a TextBox in Visual Basic. By the way, the "END" is returned as "ÅND" if this gives any further clues!
@ DEVICE...
Hi, I'm testing the serial communication between a 16F876 and a VB6 application. I read HSERIN then send it straight back out as HSEROUT. But I don't always receive the character I sent. eg:
Sent to...
Thanks for the suggestions.
Using PIR1.5 I am getting some response but it only works once in the loop.
Below is my new simplified loop for testing.
I am sending the data from the PC myself...
Hi,
I have my PIC reading from the PC (VB6 program). The code below makes the PIC wait, after switching on, for "XX-" from the PC and will then execute the line depending on the next character:...
Hi,
Can anyone give me the most simple hserin code to put in a 16F876 which will set a pin high when I send a "1" from VB over the comm port?
All the code I've seen seems a bit advanced! Once I...
Thanks Bruce, thanks Joe.S.
The project is now working. I hope this is useful to others too.
It's a good forum.
Cheers
macinug
Bruce,
Thanks for looking and for some good points.
The bridge voltage (R1/R2) is either 0V or 4V. I used analog as I may need to be flexible on the voltage values later on.
The sleep...
Hi Bruce,
Here it is. Basically driving a H-Bridge with 2 inputs and an enable.
Hope this helps. The analog input and sleep interrupt is derived from one 0/12V signal, hence stepped down.
Thanks
Thanks Joe.S and Bruce.
The SLEEP routine does actually work!!
Doesn't the GPIO = %00000000 command set all pins which are outputs to 0?
TRISIO configures them as either inputs or outputs?
It...
Hi,
This project opens a valve if it's closed and has 5V at the A/D input, and closes it if it is open and has a 0V at the A/D input, going to sleep after 10s. It wakes if the GP5 input goes high....