I set the baudrate down to 300 (there's a jumper to do so).
Can I connect my display directly to the PIC or is this not possible?
I set the baudrate down to 300 (there's a jumper to do so).
Can I connect my display directly to the PIC or is this not possible?
Roger
It's working now.
So yes, the display can be directly connected to the PIC. I've inserted a 1k resistor to limit the current and it's fine.
It works at 300Bds without crystal.
At 1200Bd, it's getting fuzzy: sometimes I get correct characters on the screen, and sometimes the display is meesed-up.
At 2400Bd, it won't work anymore.
I can't understand why the same circuit will work perfectly at 9600Bd on the PC's terminal?
Roger
unless you calibrate the internal OSC, it will never be accurate. AND EVEN IF you calibrate it, you'll need to hire someone to fine tune it when temperature shift, wind is going on the other side, when you loose weight etc etc etc.
I already said few times before... for serious serial comm (critical timing), use a crystal. Ceramic resonator are still nice.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hello,
It's all about timing, just like machines with gears and chains. If you engine's valves get out of time then they hit the pistons. If the old WW1 airplains machine guns get out of time then they shoot off the propeller. Same with Bits of information, if pic sends data at 2300 and the LCD is expecting 2400 then no sale! You get garbage. That is why the oscillator has to run at a <b>KNOWN and FIXED, value</b> so the pic can do it's job at the time expected of it.
Just like your homework, turned in late - no credit!
JS
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
It looks like SERIAL communication is not the best method to make different equipments communicate together. It's cheap, simple, uses only one data pin but is quite unreliable.
What is then better? I2C? Yes, but then you need at least 2 wires (Clock and Data).
Is there another "low PIN cost" communication system?
Roger
Yes it is reliable BUT...at least you need a reliable hardware design to start, then everything will follow. The internal osc is never reliable for asynchronous serial communication anyways.
you could still share the OSC/Clockout of 1 PIC and connect all other pic to it... everybody will have the same the same reference so it could work. Never tried it, but in theory it have to work.
The Synchronous communication will work. You can use SHIFTOUT to send the data.. but you'll need to build your own routine to receive and decode it... or use the USART in synchronous mode.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Thanks Mister_E.
I think I'm going to do as you say: build my own decoding routine.
In fact, I'm trying to find the best ways to track Variables, Values and Status (bits) in my programs for debugging purpose.
I've found the trial version of PIC Simulator from http://www.oshonsoft.com/. But it seems it cannot show variables that haven been compiled with their program (?).
I don't know how you "professionals" do it.
Any good advise is welcome.
Please keep in mind that I'm a hobbyist and can't invest lots of $ (I don't make money with PICs - I just make my familly crazy...)
Last week, I have bought (my wife got mad once again...) the PICkit2 programmer - would this one be any help?
Roger
Not another Sim issue? why i'm not surprised?
BTW, i usually use a Serial communication between my PIC and my PC, OR if there's a LCD attached to the project i could use it and drop some data on. I prefer the serial communication.
An ICD could be a nice option. PICKIT 2 have a debugger for a really few models listed bellow
I never tried it, so can't comment how good it is.Originally Posted by http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName =en027813
Mecanique ICD (comming with the MicroCode Studio PLUS version) works pretty nice even if it's a little bit slow. Example and tutorial bellow
http://rentron.com/PicBasic/MCS_X3.htm
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
You know what is not reliable are old prototype boards, that is why I prefer to use serial lcd to prove out code, as it uses 20 less connections. later it is simple to change over to lcdout routines, and if you use the lcd routine in My thread (mostly Darrel's code) then you can use standard lcdout type formatting so there is less to change.
http://www.picbasic.co.uk/forum/showthread.php?t=4972 post 16
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Anyhow, if you want to make a (acceptable) serial communication, you'll need to clock your PIC with a crystal.
So, if you create an application where timing is not relevant, you may want to use all your available PIC's ports and use the internal oscillator
Monitoring your program with a serial communication will, at least, cost you 3 ports (2 for crystal + 1 for serial comm.).
This can be especially critical when you are using small PICs.
Thanks for pointing to your routine - can be really usefull.
Roger
Hi Joe,
I got a hold of several of the kits that have the phanderson chip in them and NOW I see what your were referring to. What a hassle it was figuring out their code versus the straight forward method that I was referring to.
Thank you for the education!!!!
BobK
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks