This how I'd change the code. Compiles for 16F1829. So what oscillator are you actually using?
' Name : HSERX.pbp
' Compiler : PICBASIC PRO Compiler 2.6
' Assembler : PM or MPASM...
Type: Posts; User: prstein; Keyword(s):
This how I'd change the code. Compiles for 16F1829. So what oscillator are you actually using?
' Name : HSERX.pbp
' Compiler : PICBASIC PRO Compiler 2.6
' Assembler : PM or MPASM...
The hardware serial port will only deal with individual bytes. Whatever else is or is not going on, you cannot read directly into a word variable in that manner. You could use
Hserin...
Hello Mr. thasatelliteguy,
Make the variable "char" a byte instead of a word. Seriously, give that a try...
Best Regards,
Paul
Hello Craig,
I suspect you've found the problem--capacitance (or other leakage) in the setup. Good job! I think you'll do better on veraboard... For a quick fix try putting relatively high...
Hello Craig,
Have you made any changes to the code? Perhaps added an interrupt that might be pulling it out? If you have made some changes please post your code, it might be somewhat easier than...
Hello Sheldon,
SHIFTIN and SHIFTOUT take care of setting the data directions on their own; PBP takes care of it. I checked some code where I have used these commands and (for no particular...
What version of PBP are you using? And, which assembler is MCS using?
In PBP3, the config settings would be something like:
#CONFIG
__config _INTRC_IO & _WDT_OFF & _PWRTE_OFF &...
Ha! I was hoping that *you* would do testing and figure it out for *me*!
And please don't tell my wife I may have admitted to being wrong about something...wouldn't want to raise her expectations....
Hello Art,
I am cautiously encouraged...8v) A quick google indicates that BT keyboards use the HID protocol. I've only used SPP (serial port profile), and SPP may be the problem with Apple. ...
Hello Art,
Although I would LOVE to be proven wrong, I don't believe what you are seeking is possible using an un-jailbroken iPhone. My understanding is that Apple only allows "approved" devices...
I've only used MikroE Basic for 24-bit PICs but I agree with most of your sentiments. Working with serial, my primary means of communication, seems a lot more difficult than it ought to be. I will...
Hi Barry,
Take a look at the REV operator in the PBP manual. This what you're looking for?
Best Regards,
Paul
Hello Sheldon,
I don't have much understanding of what else is going on in the code, but having it work for your needs is far more important than it being pretty. Assembler remains beyond me...
I know effectively nothing about assembly. I don't think HPWM can be used like that on sequential pins. I would try something interrupt based, like this:
'16F1825
Define OSC 32
'32 MHz
'= 8...
What oscillator speed are you using, and is a CCP pin available?
Best Regards,
Paul
Congrats on getting it working. Will you be using the software-based PWM or the hardware based HPWM?
Best Regards,
Paul
I notice a couple of oddities in your code that may (or may not!) be part of the problem. You are using the PBP ADCIN command but not any of the PBP defines. I don't know if PBP needs the defines...
Hello Ian,
Have you seen this thread? http://www.picbasic.co.uk/forum/showthread.php?t=14932
Best Regards,
Paul
Excellent! I hope it works perfectly!
Best Regards,
Paul
Hello Szczepaniec;
If there are no other takers I'd enjoy doing it. It'll take as long as it takes for the part to arrive from SparkFun, plus a day. Work for you?
Best Regards,
Paul
Since it takes 4 clock cycles to complete a single operation, divide the oscillator frequency by 4 to get the number of operations the PIC can perform in a second:
4,000,000/4 = 1,000,000...
Hey Everybody,
Thanks for this thread, you saved me a truckload of frustration! The series diodes worked in my case.
All the Best,
Paul
Chuck Hellebuyck's book is the best commercial basic-to-intermediate PBP book that I've seen. As far as other recommendations:
1. The manual that comes with PB3! There is a wealth of knowledge...
Hiya,
Within reason, I2C should be indifferent to the clock speed. What matters is the state of the SDA when the the SCL transitions. As far as I know the only speed related issue is exceeding...
The baud rates listed in the datasheet relate to using the chip's internal USART. To access this you would need to use the HSERIN command, use the specific USART RX pin, and likely need a level...