Serial out and serial in on same PIC pin? Normally separate pins.
Type: Posts; User: MikeWinston; Keyword(s):
Serial out and serial in on same PIC pin? Normally separate pins.
why not use open mode. in the manual under serout2 command says:
Bit 15 selects whether the data pin is always driven (bit 15 = 0), or is open in one of
the states (bit 15 = 1). The open mode...
Got it working.
Changed code in Macro. Removed the local label called OverVar. Not sure why it was there anyway. Also took the gosub LcdGotoXY out of for/next loop since it only needed to be...
Archangel,
No luck there. I just got a blank screen. I put all all my vars in Bank 0 like following example:
posX var byte BANK0 SYSTEM
I can get it to work if i manually do everything. ...
O.K. I'll try that tomorrow. (I don't have chip with me now)
thanks,
Mike
You may be right longpole. But this is what it's pointing to at this time.
Sometimes i guess we wish for more problems so we have more information to troubleshoot.
Well DT_interrupts handles...
This is what i'm thinking i have to do to solve this. Or please tell me if i'm way off.........
If i call the macro from another page, do i need to account for page bits?
'psuedo code for macro'...
Hello,
Writing a small application to write to Nokia 5110 LCD. I am using code found in the wiki section with some small changes. I am not using the PrintStr macro.
It is the PrintVar macro i am...
Art,
don't know if it's smaller. i was going for speed rather than code size.
Mike -
instead of a for/next shift, how about a in-place overwrite. (instead of shifting the data, shift the index variable.)
index = 0
Loop:
adResult = {...new voltage value}
arraySum = arraySum...
If X5-2 is power to your sensor, then maybe try a capacitor there.
But first I would try what aratti said and use bigger caps by the regulator.
Mike -
Ahh I see your right. My mistake. I should have not assumed 128 bytes. Sorry about that.
Thanks ScaleRobotics.
PBP Manual says max word array elements for PIC16 device is 48. I receive "unable to fit variable" compilation error if I try to put more than 40.
I would like to keep the pin count of device to 14...
I agree Charles. Isolated grounds would be best. But if thats not practical, than keeping circuit neighborhoods isolated would be next best. At least thats the way I understand it and have seen in...
Actually the picbasic pro manual shows under the serin command, you
can input 12 volts directly through a current limiting resistor. (22k in example)
But if you truly need a reliable trigger,...
mister_e,
Thats a good trick. One to remember. And it only produces 9 lines of
instruction. But your right, the PIC I'm using (16F684), ADRESH/L are not
next to each other.
Actually, ACCON0...
just a shot in the dark here, but do you have the following line somewhere in your code?
HIGHINT:
If so, is it inside the ASM/ENDASM block?
Mike -
Well it turns out the more intuitive way is also a little faster. That is if I
have done this correctly.
I used [view] [program memory] in MPLab and counted the number of
instructions between...
Hi Henrik,
I understand your explanation and thank you. But in your last bit of code
doesn't it need the ".lowbyte" part?
For Index = 0 to 16 STEP 2
accData.lowbyte[Index] = ADRESL 'Low...
Thanks Bert. I see what your getting at. ADRESH was a word.
I just tried ADRESH as a byte and had an overflow. oops, I missed that one.
I guess I'll use the temp variable way.
There is...
I have tested the code with VB.Net, and it works, but I haven't tested on the PIC yet.
I actually tried this code first but it did not compile:
adcData.highbyte[index] = ADRESH...
Hello All,
I would like an "expert check" on this one....
I need to put 2 ADC bytes into a word variable thats part of an array.
This is what I have:
adcData var word[16]
adcData[index] =...
Eureka! Yes I'm that happy. I found the reason why the USB interrupt was not working.
It was the line I uncommented in the cdc_desc.bas file (#define USE_USB_BUS_SENSE_IO).
I read somewhere,...
Just an update if anyone is interested. The PIC on the USB 2.0 computer is over 6 hours and
has not dropped its connection. The same PIC on the USB 1.1 computer could not hold its
connection for...
Hello Darrel,
Sorry but that code is not connecting either. I copied everything over. And it compiles OK.
What is also concerning me is the version I have with the timer interrupt is also...