PDA

View Full Version : PIC16F88 senior design



AlaskanEE
- 20th April 2007, 05:43
Hi everyone,

I'm going to have to first state that I am the noob of all noobs. I've never taken any courses on or worked with any sort of programming prior to the senior design project that I'm working on. So in short some of my questions might be really dumb or really simple to answer. I'm programming a 16F88 PIC to complete five basic task for my part of the senior design project. We chose the 16F88 simply because it was used in an earlier lab so we had one on hand and it was the only microcontroler that I had seen any programming done on. The five main task I wish for the PIC to accomplish are as follow:

1. To simply allow serial data in from a bluesmirf and then directly out to a LCD screen. I would like this to be acomplished using one input pin and one output pin.

2. When the first bit of serial information is recieved from the bluesmirf, use the first high bit recieved to activate the backlight of the LCD. After 10 seconds the PIC should send the serial data to turn the backlight of the LCD off again. Again I'd like to use one input pin and one output pin.

3. Again the same serial information should be used to send out a high voltage to be used by an audible alert circuit. The voltage should come out in a half second burst then a half second of low voltage and then repeat 3 times.

4. A high voltage will be sent to the PIC from a push button switch. This high voltage should cause the PIC to send out the serial data to activate the backlight of the LCD for 10 seconds then turn it off.

5. The final task for the PIC is to recieve a high voltage from the activation of a warning light LED and then send out a series of high low voltages just like in task three.

I've written out a code that I thought would work, but it doesn't complete any of the tasks that I want it to. Some basic questions would be, can I use a single input port and a single output port for each of the tasks that I'd like to complete? If so am I assigning the ports right by using TRISA.0 = 1 to set port A.0 to input and TRISB.0 = 0 to set port B.0 to an output? I'm using the SERIN and SEROUT commands to send serial data and I understand the first command after SEROUT is the pin you want to use and the next is the baude rate you're using, but what is the next instruction for and how do I know what to assign to it? Finally can you send hexadecimal commands out of the pic Serially to be understood by the LCD? Below is a copy of the code that I have so far. Any and all help is greatly appriciated.

BobK
- 20th April 2007, 18:47
Hi Alaskan,

I suggest you go to www.microchip.com and download the datasheet on the 16F88 and learn about the chip. Pay particular attention to the part about analog versus digital I/O and comparators. You need to address these issues before your basic program will work. Also your individual TRIS statements can be setup as TRISA=%00000001 with PortA.0 being an input and the rest of PortA are outputs for example.

Next I would suggest that you spend a little time looking over this forum at some of the code examples and other peoples problem that are listed to get an idea as to how to write a program and troubleshoot problems. You're off to a decent start, but you can learn alot from this forum.

There's some great minds on this forum but they won't write your program for you. Don't get us wrong, this is YOUR PROJECT. You have to write it. When you get into a snag then ask for help. BUT the two most important things to have on hand is the PBP manual and the specific datasheet. If you don't have the PBP manual, then goto www.melabs.com and download a copy.

I've got to go to work now.

Have a nice day!

BobK.

skimask
- 20th April 2007, 19:20
I'm going to have to first state that I am the noob of all noobs.
Seems like everybody is...


So in short some of my questions might be really dumb or really simple to answer.
Maybe so...but what's really 'dumb' or 'really simple' is when the answer is right in front of you in the little green book.


I'm programming a 16F88 PIC to complete five basic task for my part of the senior design project.
Why are these simple projects always part of a 'senior design project'? Senior in high school or senior in college? If senior in college, somebody better get their money back.


We chose the 16F88 simply because it was used in an earlier lab so we had one on hand and it was the only microcontroler that I had seen any programming done on.
If this is part of some sort of class, you'd think that there would be resources to possibly use more than a 16F88. But, the 16F88 is a good choice for a simpler project...


I've written out a code that I thought would work, but it doesn't complete any of the tasks that I want it to. Some basic questions would be, can I use a single input port and a single output port for each of the tasks that I'd like to complete? If so am I assigning the ports right by using TRISA.0 = 1 to set port A.0 to input and TRISB.0 = 0 to set port B.0 to an output? I'm using the SERIN and SEROUT commands to send serial data and I understand the first command after SEROUT is the pin you want to use and the next is the baude rate you're using, but what is the next instruction for and how do I know what to assign to it? Finally can you send hexadecimal commands out of the pic Serially to be understood by the LCD? Below is a copy of the code that I have so far. Any and all help is greatly appriciated.

Most, if not all, of these questions can be answered by looking in the little green book...

As far as your code goes...
DEFINE OSC 20 'SET OSCILATION TO 20MHz
------------------Doesn't set the oscillation to 20Mhz. It only tells PBP what you are going to use for an oscillator. It's up to you to get the oscillator to work.

TRISA.0 = %1 'SETS PORTA.0 AS AN INPUT
TRISA.1 = %1 'SETS PORTA.1 AS AN INPUT
TRISA.2 = %1 'SETS PORTA.2 AS AN INPUT
TRISA.3 = %1 'SETS PORT A.3 TO AN INPUT
-------------- TRISA=$0F does the same thing....
-------------- same notes for TRISB

SERIN SERIAL_INPUT,T9600,[1] 'MAKES PORTA.0 A SERIAL INPUT PORT
SEROUT SERIAL_OUTPUT,T9600,[1] 'MAKES PORTB.0 A SERIAL OUTPUT PORT
SEROUT BCKLGHTO,T9600,[1]
-------------- If you are connected to an actual RS232 port, these won't work too well....

PAUSE 10
-------------- Read the little green book to see why this won't work for a 10 second pause...

LOOP: IF (X<3) THEN 'sends out a high voltage for .5 seconds
-------------- No real need to put X<3 inside parenthesis, but not a bad idea...



And to tack onto everything BobK has already said (every bit of which I agree with 100%, except the manual part), we'll help you figure out what's wrong...but we aren't going to write the code for you. Apparently, you're in school to learn, SO LEARN! :)

AlaskanEE
- 20th April 2007, 19:56
I'm not sure what little green book you're refering to. The PICBasic pro program is installed in the school computers, thus there is no manual to look at. I've gone online and looked up the manual so I'm assuming that's what you're refering to. I'm a circuits electrical engineer and thus have never worked with programming or microcontrollers, no classes were ever offered so I'm just learning this simply for my senior design. Keep in mind I'm taking 16 other hours, have a part time job am on two sports teams, and am in multiple organizations on campous so I don't have oodles and oodles of time to devote to reading resources on the subject that I have to look up raondomly on the internet. For senior design they allow your groups to choose a project and run with it, they won't hold your hand anymore so I'm just trying to use the resources out there for help. I know I don't know much about these topics and I've read the PICBasic manual I found online and I've looked through the datasheet, but honestly since I've never had any help or classes on any of this stuff most of what they talk about is beyond me without me spending more time to research the research. Hopefully that helps a bit with where I'm coming from, also despite the preceeding ranting I'm extremly thankfull for the help I've recieved so far on this forum, I know you're using your time to help someone that you don't even know so thank you. I know we're not using RS232 to communicate by the way. So the 16F88 doesn't have it's own internal oscilating crystal. Is there any way to get around creating an external oscilating circuit or is that a must? Also I know PAUSE 10 doesn't pause for ten seconds, I just thought you might need a breif pause between sending the first hexadecimal command to the LCD and the second. Can I just send one right after the other with no break?

mackrackit
- 20th April 2007, 21:57
Keep in mind I'm taking 16 other hours, have a part time job am on two sports teams, and am in multiple organizations on campous so I don't have oodles and oodles of time to devote to reading resources on the subject that I have to look up raondomly on the internet.
Are you trying to make us feel sorry for you? It is not working. Ever think about priorities? The time spent playing(sports) could be spent on learning.

External oscillating circuit is a must. The data sheet gives several examples. I like the crystals with built in caps, one part top do the job and the 20Mhz is cheap.


I just thought you might need a breif pause between sending the first hexadecimal command to the LCD and the second. Can I just send one right after the other with no break?
Normally I would say no, but with out knowing exactly which module you are using I can not look up the DATA sheet to give you a good answer.

Fix the things Shimask pointed out, do some more reading and get back to us if you still need help.

skimask
- 21st April 2007, 01:53
I'm not sure what little green book you're refering to. The PICBasic pro program is installed in the school computers, thus there is no manual to look at.

That right there sounds a bit fishy to me...ok...a LOT fishy...


For senior design they allow your groups to choose a project and run with it, they won't hold your hand anymore so I'm just trying to use the resources out there for help.
Well, don't expect me (I can't speak for 'us') to hold you hand, but I expect the sentiment is the same.


I'm extremly thankfull for the help I've recieved so far on this forum
Thankful doesn't pay the bills...BUT...if you learn, then usually that's enough, 'cause the more you learn, the less you ask.


So the 16F88 doesn't have it's own internal oscilating crystal.
It doesn't? Maybe I've got a different version of the 16F88.

AlaskanEE
- 21st April 2007, 02:40
The reason there is no green book is because the university bought the lisence for the PICBasic Pro software for only three computers in the lab(the program isn't on any of the other computers), the manual probably is somewhere in the university, but since it's a large campous I'm at a loss to know where it is, simply it's not inside the lab anymore. So if it got missplaced or taken I don't know. Also I am thankful for the help, I was under the impression that this was an open forum for the exchange of ideas and to help those that need help with the knowlege you have. Thus I can only offer my thanks, if this is some form of a forum that requires money I will remove myself so as to no longer leach off of it. Also there have allready been two insults to my university posted, and I truly love my university, please try to avoid using replies that imply my university is sub-par and trying to cheat the system. I mean no disrespect to anyone, I'm just trying to use the resources around me to get this done. The only reason I'm even doing any programming is because no one else in the group wanted to step up, so I did. Programming isn't part of my major, nor have I ever done it, I'm just trying to finish my part. If this forum isn't supposed to be used to ask questions, I'm sorry for my posting I didn't mean to do anything wrong.

skimask
- 21st April 2007, 02:52
Whoa...ease up there Sparky...
Ya gotta figure...somebody comes on-line, asking questions which should be obvious 'cause they're in the manul, says there is no manual, is doing some sort of senior project at a University... Again, it all sounds fishy to me...but that's not the point...
The posts I've given here are MINE...nobody's else, just mine and only mine. Don't take my 'opinions' as the rules around here. There may be people around here that are a lot more giving than I am, good for them. I look for a bit of 'one hand washes the other' type thing. You ask a question, I give you the answer, hopefully that answer can lead you to other answers, so you don't have to ask as many questions.

As a 'for instance'...you stated in post #4 that the 16F88 doesn't have an internal oscillating crystal. Well, you would've known that the 16F88 had it's own internal oscillator block that can run at a number of speeds if you'd have read the datasheet, and not even read it, but at least skimmed over it fairly well.
That's the kind of thing I'm talking about...the blatently obvious question that could've been avoided by the least bit of 'research'. And there ya go...

So...after you have taken my advice written in post #3 into account and have made some changes to your code. Recompile the code, work the hardware, try it out, and let us know what's up...

Pic_User
- 21st April 2007, 04:19
Hi AlaskanEE,

Welcome to the forum.

I'm a circuits electrical engineer and thus have never worked with programming or microcontrollers
You picked the right microcontroller for an analog guy. The PIC devices have comparators, voltage references, A to D converters, etc.. You are going to love these microcontrollers. A perfect fit with the analog world.

So the 16F88 doesn't have it's own internal oscilating crystal. Is there any way to get around creating an external oscilating circuit or is that a must?
You may have based this on what Dave correctly said:


External oscillating circuit is a must. The data sheet gives several examples. I like the crystals with built in caps, one part to do the job and the 20Mhz is cheap.
The only (out-side the PIC) components needed for the "External oscillating circuit", are a simple three terminal ceramic resonator or a crystal with two capacitors to ground.
Some of the serial stuff needs a more stable oscillator than the drifty one internal to the PIC. The one in the PIC is okay for a lot of projects.

Don’t give up on the forum, you are an equal member. Keep asking questions. That’s what it is here for. When a person comes along with a similar question, they won’t have to ask. Don’t forget to search for your question / answer before posting. Have fun. Learn.
-Adam-

AlaskanEE
- 21st April 2007, 04:39
Sorry skimask I was just trying to step gengerly in the forum since I'm new, but was trying to get my point across without ticking anyone off. I know it came off pansy, but I was playing it safe. I misunderstood what you were saying about the internal oscilator. I had skimmed the data sheet and accidentally lumped the statement "the PIC16F88 CAN be set to 20MHz" in with the preceeding paragraph saying that the PIC's internal oscilator can be set to multiple frequencies. So when you said that the DEFINE OSC command doesn't set anything to 20MHz I was confused and the sentance "so the 16F88 doesn't have an internal oscilator" should have had a question mark cause I was asking. Also I was just trying to let everyone know what I'm doing and show the code I was using so that they could comment on what I had done, if it would work or not. I wasn't trying to get everyone to write my code for me and I'm sorry for my lack of clarity on that point. Again sorry for the miscommuniactions and lack of clarity. Also thanks Adam for the suport, I just blew this up too quickly, was getting frustrated with the programming. Chalk it up to experience I guess.

mackrackit
- 21st April 2007, 04:56
I should have been a little more clear. If you want something reliable, external oscillator is a must. Being that serial communications are involved. The internals work fine but sometimes the timing will get a little off.

The oscillator you choose will need to be defined in the *.inc file for the chip you are using along with the other fuses. In the *.bas file you tell PBP what the oscillator speed is for timing. These are the same yet different.

You will find a line in the *.inc file something like this.

__config _XT_OSC & _WDT_ON & _PWRTE_ON & _BODEN_ON & _LVP_OFF & _CP_OFF

Look at the data sheet and it will tell you what each one does.

T.Jackson
- 22nd April 2007, 13:55
Whoa...ease up there Sparky...
Ya gotta figure...somebody comes on-line, asking questions which should be obvious 'cause they're in the manul, says there is no manual, is doing some sort of senior project at a University... Again, it all sounds fishy to me...but that's not the point...
The posts I've given here are MINE...nobody's else, just mine and only mine. Don't take my 'opinions' as the rules around here. There may be people around here that are a lot more giving than I am, good for them. I look for a bit of 'one hand washes the other' type thing. You ask a question, I give you the answer, hopefully that answer can lead you to other answers, so you don't have to ask as many questions.

As a 'for instance'...you stated in post #4 that the 16F88 doesn't have an internal oscillating crystal. Well, you would've known that the 16F88 had it's own internal oscillator block that can run at a number of speeds if you'd have read the datasheet, and not even read it, but at least skimmed over it fairly well.
That's the kind of thing I'm talking about...the blatently obvious question that could've been avoided by the least bit of 'research'. And there ya go...

So...after you have taken my advice written in post #3 into account and have made some changes to your code. Recompile the code, work the hardware, try it out, and let us know what's up...

I'm convinced that someone comes to this forum looking to strike up arguments.

skimask
- 22nd April 2007, 18:28
I'm convinced that someone comes to this forum looking to strike up arguments.

Yep...that's my only function...
Actually, here's my only function:

nuffsaid var bit : nuffsaid = 1
Argument var bit : Argument = 0
blatentlyobvious var bit : blatentlyobvious = 0

main:
argument = 1
if argument then
gosub skimask
endif
goto main

skimask:
blatentlyobvious = nuffsaid
return

Any questions?

mackrackit
- 22nd April 2007, 20:05
I think sometimes you might need to use WORD size VAR. :)

blatentlyobvious var bit : blatentlyobvious = 0

Check the DATA sheet, bit is not big enough. :)

skimask
- 22nd April 2007, 23:21
I think sometimes you might need to use WORD size VAR. :)
blatentlyobvious var bit : blatentlyobvious = 0
Check the DATA sheet, bit is not big enough. :)

How 'bout this:
nuffsaid var bit : nuffsaid = 1 : Argument var bit : Argument = 0
blatentlyobvious var signed_quad_double_float[10 ^ 100]
blatentlyobvious = 0

main:
argument = 1 : if argument then gosub skimask
goto main

skimask:
blatentlyobvious = 1 / 0
return

Now then...how 'bout that new, improved code AlaskanEE?

dhouston
- 23rd April 2007, 04:29
I'm convinced that someone comes to this forum looking to strike up arguments.Some forums allow members to create an Ignore List so they don't have to read posts from unhelpful misfits.

rhino
- 23rd April 2007, 05:08
blatentlyobvious var signed_quad_double_float[10 ^ 100]


Looks to me like an improper assignment of a variable. Check out page 21 section 4.3 of the little green book and let us know what you find out.

skimask
- 23rd April 2007, 05:21
Looks to me like an improper assignment of a variable. Check out page 21 section 4.3 of the little green book and let us know what you find out.

Oh, that variable type is in my 'PBP' wish list, and the number of elements in that array are in my 'PIC' wish list.

skimask
- 23rd April 2007, 05:24
Some forums allow members to create an Ignore List so they don't have to read posts from unhelpful misfits.

A forum such as this one, yes...
...and I would use it...but I don't, and some of the comments, whether pointed at me (or anybody else) directly or indirectly... they amuse me...

T.Jackson
- 23rd April 2007, 07:25
Some forums allow members to create an Ignore List so they don't have to read posts from unhelpful misfits.

What astonishes me the most is how tolerant the admins on this forum are.
I personally wouldn't put up with some of it.

Melanie
- 23rd April 2007, 09:29
Admins don't always have time to read all posts on all threads!

Let's be nice people - or let me rephrase that - Let's be nice on this forum....

I know it's tempting to reply to almost every newbie "Read the Manual or Read the Datasheet", I've done it myself to folks - and not just once or twice. It's frustraiting to read some of the posts, especially when there's a 14-page list of what they have to do/achieve and it's coupled with a request for schematics/code/help/complete ready-canned solution for free and the deadline is today lunchtime and they've still got to play a soccer match in the interim - oh, and by the way they haven't got a clue about electronics/programming, they're really a philosophy student that's been landed with the task.

OK, we've heard it all before! Sometimes it's better not to answer, and people might get the message that they are expected to make some effort themselves too. And if they're really that clueless then a Landscape Gardening project (growing a dwarf Marijuana or similar) is probably a better student option.

skimask
- 23rd April 2007, 14:33
Admins don't always have time to read all posts on all threads!
With all the spam and viri floating around these days, I'm surprised you have any time to read any of the posts...


And if they're really that clueless then a Landscape Gardening project (growing a dwarf Marijuana or similar) is probably a better student option.

Whoa! Where'd that come from?

AlaskanEE
- 24th April 2007, 05:01
I thought I might have burnt out my PIC so I started trying very basic commands to test it out. Just output a voltage high on one pin when there's a voltage high on the input pin. This is the code I used:

DEFINE OSC 8
TRISA.1 = 1
TRISA.2 = 0
LOOP:
IF PORTA.1 = 1 THEN HIGH PORTA.2
GOTO LOOP

END

I used a VDD of 5V and got an output of 5V at A.2 but sometimes it will suddenly drop to 0 volts without me adjusting anything. I remove the pic from the circuit and then put it straight back in and the output is at 5V again. Sometimes the voltage stays for a while sometimes it goes away rapidly. Does it sound like my PIC might be faulty? or is there a problem in my code. Also if the PIC is outputing a high and I remove the high input I would expect the output to drop as well, but it doesn't. Do I need to include a second IF, THEN statement to achieve this result?

skimask
- 24th April 2007, 05:09
DEFINE OSC 8
TRISA.1 = 1
TRISA.2 = 0
LOOP:
IF PORTA.1 = 1 THEN HIGH PORTA.2
GOTO LOOP

END

Also if the PIC is outputing a high and I remove the high input I would expect the output to drop as well, but it doesn't. Do I need to include a second IF, THEN statement to achieve this result?

If you read the code inside your 'LOOP', there's nothing there to tell the pin to go low if the input goes low...therefore...

DEFINE OSC 8
TRISA.1 = 1
TRISA.2 = 0
LOOP:
PORTA.2 = PORTA.1
GOTO LOOP

Also, check your datasheet regarding PortA and analog settings, section 12.0 of the PIC16F88 datasheet. You might see something there that might throw a wrench into your master plan! :)

AlaskanEE
- 24th April 2007, 06:12
I switched up to using B.1 as an input and B.2 as an output along with the portb.1=portb.2 and it worked well. After about 13 seconds, however, it stops working. Is this due to the fact that I'm relying on the internal oscilator or is there additional code that I don't know about. Also I looked over 12.0 and I see that PORT A pins would need additional lines of code to work, but I'm not fully understanding what their saying. Do the pins for PORTA have to be used for A/D conversion?

skimask
- 24th April 2007, 06:16
I switched up to using B.1 as an input and B.2 as an output along with the portb.1=portb.2 and it worked well. After about 13 seconds, however, it stops working. Is this due to the fact that I'm relying on the internal oscilator or is there additional code that I don't know about.

Common stuff:
Pullup on MCLR to Vdd?
.1uf cap across Vdd and Vss?
Power supply solid and smooth?
WDT config set to Off?


Also I looked over 12.0 and I see that PORT A pins would need additional lines of code to work, but I'm not fully understanding what their saying. Do the pins for PORTA have to be used for A/D conversion?
Keep reading past the first couple of paragraphs, read all about the registers relating to the A/D converter and the ports...You'll figure it out.

rhino
- 24th April 2007, 15:54
AlaskanEE -
Hint....
Read Section 12.0 as Skimasks suggests, review table 12-1. Now go to pg. 52 and review table 5-2. Look at the column that tells you what the POR, BOR and value after all other resets is. What does it tell you about the default setting of the registers in table 12-1?
Here's another good tool. Use this LINK (http://www.google.com/custom?hl=en&cof=AH%3Aleft%3BS%3Ahttp%3A%2F%2Fwww.picbasic.co.u k%2Fforum%3BL%3Ahttp%3A%2F%2Fwww.picbasic.org%2Ffo rum%2Fimages%2Fcrownhill_logo.gif%3BLH%3A37%3BLW%3 A174%3B&domains=picbasic.co.uk&q=&btnG=Search&sitesearch=picbasic.co.uk) to search the forums. It seems to work better than the built in search tool.

mackrackit
- 24th April 2007, 19:22
Look at this for PORTA setup

http://www.picbasic.co.uk/forum/showthread.php?t=561

and

http://www.picbasic.co.uk/forum/showthread.php?t=562

These are in the FACT section.

skimask
- 24th April 2007, 20:15
These are in the FACT section.

True that they are FACTs, but don't you mean FAQ section? :)

AlaskanEE
- 24th April 2007, 22:11
So if I want to use an analog input for port A I need to include a line of code such as this:

ANSEL = %00001111

if I want PORTA.0-PORTA.3 to be analog inputs, but if I'm getting serial data in through these pins can I keep them as digital input/output ports and just use the first digital high that comes in from the serial information to activate some output on another pin? Also I found a project that used the code 'ADCON1.7 = 1' to align bit 7 to be right justified and then 'ADCON1.4 = 0' and 'ADCON1.5 = 0' to default to using Vref. When I'm not doing any analog to digital conversion I shouldn't need any of these commands should I?

skimask
- 24th April 2007, 22:33
So if I want to use an analog input for port A I need to include a line of code such as this:
ANSEL = %00001111
if I want PORTA.0-PORTA.3 to be analog inputs, but if I'm getting serial data in through these pins can I keep them as digital input/output ports and just use the first digital high that comes in from the serial information to activate some output on another pin? Also I found a project that used the code 'ADCON1.7 = 1' to align bit 7 to be right justified and then 'ADCON1.4 = 0' and 'ADCON1.5 = 0' to default to using Vref. When I'm not doing any analog to digital conversion I shouldn't need any of these commands should I?

Basically, the deal is, you have to look at the register's default values (the little numbers above the blocks in the register descriptions in the datasheets). If it says 'R/W-0', then it's a read/write register and on RESET(MCLR), it's set to '0'...and so on...

So basically, you're on the right track with what you said. I don't have the datasheet handy, you could be right on the bits, if that's what you read, then that's what it is.

mackrackit
- 24th April 2007, 22:50
True that they are FACTs, but don't you mean FAQ section? :)
Details,Details,Details. FACTs in the FAQ section.


So if I want to use an analog input for port A I need to include a line of code such as this:

ANSEL = %00001111Check the data sheet for the PIC you are using. I have not used the 16F88 yet, some PICs are a little different.


if I want PORTA.0-PORTA.3 to be analog inputs, but if I'm getting serial data in through these pins can I keep them as digital input/output ports and just use the first digital high that comes in from the serial information to activate some output on another pin? Also I found a project that used the code 'ADCON1.7 = 1' to align bit 7 to be right justified and then 'ADCON1.4 = 0' and 'ADCON1.5 = 0' to default to using Vref. When I'm not doing any analog to digital conversion I shouldn't need any of these commands should I?
Something like that.
Each analog pin can be set to digital or analog.
If you use serial the pin will have to be set as digital - true.
If you are not using any analog, set all as digital.


first digital high that comes in from the serial information to activate some output on another pin?
NO, serial does not work that way. When a serial signal say XYZ comes in something could be made to happen. If serial ABC comes in something else could happen. If serial QST comes in it could be ignored.

A digital LOW state is 0 to around 2 volts. Digital HIGH is around 3.6 to 5 volts.

In between is FUZZY:)

AlaskanEE
- 24th April 2007, 23:35
What if I told my partner to have his program send an ASCII character, say, "A" before any message is sent to our bluesmirf which is connected to our LCD through my PIC. Could I use that character to activate a series of commands that would send the correct hexadecimal code to the LCD to activate the backlight then wait 10 seconds then send the code to turn off the backlight? Something like this:

INCLUDE "modedefs.bas"

SEROUT PORTB.1,T9600,[1]

SERIN PORTA.1,T9600,["A"]

IF PORTA.1 = "A" THEN
PORTB.1 = $FE
PORTB.1 = $96
PAUSE 10000
PORTB.1 = $FE
PORTB.1 = $80
endif

I'm almost sure that's not right since I'm not sending out serial data just hexadecimal numbers, but can I use the serin/serout commands inside the IF/Then statement? or am I closer than I think.

skimask
- 25th April 2007, 00:41
INCLUDE "modedefs.bas"

SEROUT PORTB.1,T9600,[1]

SERIN PORTA.1,T9600,["A"] ---- this would only wait for the "A" character, it wouldn't save it anywhere or do anything with it...

IF PORTA.1 = "A" THEN ---- again, you haven't saved your "A" character anywhere
PORTB.1 = $FE ---- it's a bit output that you're trying to send a byte out of, that don't work, but I think you already know that...


What you probably want is:

INCLUDE "modedefs.bas"
inputdata var byte
main:
SEROUT PORTB.1,T9600,[1] 'trigger something somewhere else
waitloop:
SERIN PORTA.1,T9600,[inputdata]
if inputdata <> "A" then goto waitloop
serout portb.1,T9600,$FE, $96: pause 10000:serout portb.1,T9600,$FE,$80:goto main
goto main

AlaskanEE
- 25th April 2007, 07:02
I'm now working on sending serial data from our bluesmirf through the pic straight into the serial input port of our LCD. One of my partners currently is working on his java program and has the pic at home so I can't test the code that I have till tomorrow afternoon, but the code I wrote compiles fine and uses a similar format to the code that skimask showed me (baring the backlight activation part).

@ DEVICE MCLR_OFF, PROTECT_OFF, WDT_OFF
INCLUDE "modedefs.bas"
DEFINE LCD_LINES 2
ANSEL = %00000000
SERIALDATA var byte
STORAGE VAR BYTE
MAIN:
SEROUT PORTB.0,T9600,[STORAGE]
SEARCHLOOP:
SERIN PORTA.0,T9600,[SERIALDATA]
if SERIALDATA <> "A" then goto SEARCHLOOP
SERIN PORTA.0,T9600,STORAGE: SEROUT PORTB.0,T9600,[STORAGE]
GOTO MAIN

I'm not sure if SERIN, and SEROUT work this way, but what I understand from what I've read and seen is that the serin command will put it's data in the variable byte "STORAGE" that I created and then the SEROUT will send out the serial data that is stored in that variable byte. Does the code look good? Or am I a bit off on my logic. Also I'm not fully sure what the first line does, but I saw it on another project doing serial communication with a PIC16F88 and what I do know about those commands it seems to make sense, it also hasn't hurt anythign I've done so far.

PS:
Skimask your smart "S-M-R-T....... I mean S-M-A-R-T" thanks a lot for your help so far.

skimask
- 25th April 2007, 14:31
@ DEVICE MCLR_OFF, PROTECT_OFF, WDT_OFF
Explanations for all those configurations are in the datasheets under 'Special Features' and elsewhere.


Skimask your smart "S-M-R-T....... I mean S-M-A-R-T" thanks a lot for your help so far.

Keep in mind, there's literally dozens of people here much more adept with PBP/MPASM, etc.

rhino
- 25th April 2007, 17:56
AlaskanEE -
Don't know if you ever got your hands on a PBP manual, but if you haven't, you can download one from www.melabs.com. Might help with some of those questions regarding syntax.

AlaskanEE
- 25th April 2007, 19:06
so the @ symbol tells the programmer that the line is asembly code directly and not PBP code and the other text just activates, or in this case deactivates the features of the PIC that I list. The serin command does store my incoming data into the variable that I put at the end and the serout sends that data that's in the brakets. But I'm worried that since I'm using an exterior 20MHz oscillator (with capacitors from the input of the oscillator to ground and from the ouput of the oscillatorto ground) that the timing might be off. I made a IF/THEN loop that sends a high pauses and sends a low then incraments my variable and will continue till my variable reaches 3 and the pauses were much to long when writen as "PAUSE 500". I thought this would pause 0.5 seconds since I used DEFINE OSC 20, but it didn't, it did however pause for about one second when I set it to "PAUSE 2". Any thoughts?

skimask
- 25th April 2007, 19:34
I thought this would pause 0.5 seconds since I used DEFINE OSC 20, but it didn't, it did however pause for about one second when I set it to "PAUSE 2". Any thoughts?

Show us the whole code again...

AlaskanEE
- 25th April 2007, 22:57
Here's the code to activate a loop that incraments the variable x by one each time then stops after x = 4. It's activated when a message has been sent from the blue smirf to the LCD through the pic. My partner precceeds all messages with a capital A to activate the serin command.

INCLUDE "modedefs.bas"
DEFINE OSC 20
INPUTDATA var byte
X VAR BYTE
X = 0
MAIN:
PORTB.5 = 0
SEROUT PORTB.1,T9600,[1]
WAITLOOP:
SERIN PORTA.1,T9600,[inputdata]
if inputdata <> "A" then goto waitloop
LOOP:
IF (X<4) THEN
HIGH PORTB.5
PAUSE 2
LOW PORTB.2
PAUSE 2
X = X+1
GOTO LOOP
endif
goto MAIN

This is a very simular code that activates the noise alert pulses constantly when the whearer of our device goes out of range then turns off when it comes back in range. It's activated by recieving a low at the input pin.

DEFINE OSC 20
TRISB.5 = 0
TRISB.4 = 1
X VAR BYTE
X = 0
START:
PORTB.5 = 0
IF PORTB.4 = 1 THEN GOTO START
IF PORTB.4 = 0 THEN GOTO LOOP
LOOP:
HIGH PORTB.5
PAUSE 2
LOW PORTB.5
Pause 2
IF PORTB.4 = 1 THEN GOTO START
GOTO LOOP
end

mackrackit
- 25th April 2007, 23:37
Did you set the OSC type in PBP *.inc file for this chip.

And if you did what did you set it for.

Or you can do it on this line that I do not see in the new code.

@ DEVICE MCLR_OFF, PROTECT_OFF, WDT_OFF,_XT_OSC

Double check the data sheet on this, I do not have it in front of me.

mister_e
- 25th April 2007, 23:42
The guy use a 20MHz, so, should be something like HS_OSC instead of XT_OSC.

Anyways open the M16F88.inc file and enjoy the config fuse list


; *** DEVICE Fuses Definitions
EXTRC_OSC_CLKOUT equ 3FEC0013h ; XX XXXX XXX1 XX11
EXTRC_OSC_NOCLKOUT equ 3FEC0012h ; XX XXXX XXX1 XX10
EXTRC_OSC equ 3FEC0012h ; XX XXXX XXX1 XX10
INTRC_OSC_CLKOUT equ 3FEC0011h ; XX XXXX XXX1 XX01
INTRC_OSC_NOCLKOUT equ 3FEC0010h ; XX XXXX XXX1 XX00
INTRC_OSC equ 3FEC0010h ; XX XXXX XXX1 XX00
EXTCLK_OSC equ 3FEC0003h ; XX XXXX XXX0 XX11
EC_OSC equ 3FEC0003h ; XX XXXX XXX0 XX11
HS_OSC equ 3FEC0002h ; XX XXXX XXX0 XX10
XT_OSC equ 3FEC0001h ; XX XXXX XXX0 XX01
LP_OSC equ 3FEC0000h ; XX XXXX XXX0 XX00
WDT_ON equ 3FFB0004h ; XX XXXX XXXX X1XX
WDT_OFF equ 3FFB0000h ; XX XXXX XXXX X0XX
PWRT_ON equ 3FF70000h ; XX XXXX XXXX 0XXX
PWRT_OFF equ 3FF70008h ; XX XXXX XXXX 1XXX
MCLR_ON equ 3FDF0020h ; XX XXXX XX1X XXXX
MCLR_OFF equ 3FDF0000h ; XX XXXX XX0X XXXX
BOD_ON equ 3FBF0040h ; XX XXXX X1XX XXXX
BOD_OFF equ 3FBF0000h ; XX XXXX X0XX XXXX
LVP_ON equ 3F7F0080h ; XX XXXX 1XXX XXXX
LVP_OFF equ 3F7F0000h ; XX XXXX 0XXX XXXX
CPD_ON equ 3EFF0000h ; XX XXX0 XXXX XXXX
CPD_OFF equ 3EFF0100h ; XX XXX1 XXXX XXXX
WRT_1FOURTH equ 39FF0000h ; XX X00X XXXX XXXX
WRT_HALF equ 39FF0200h ; XX X01X XXXX XXXX
WRT_3FOURTHS equ 39FF0400h ; XX X10X XXXX XXXX
WRT_OFF equ 39FF0600h ; XX X11X XXXX XXXX
DEBUG_ON equ 37FF0000h ; XX 0XXX XXXX XXXX
DEBUG_OFF equ 37FF0800h ; XX 1XXX XXXX XXXX
CCPMX_ON equ 2FFF0000h ; X0 XXXX XXXX XXXX
CCPMX_OFF equ 2FFF1000h ; X1 XXXX XXXX XXXX
PROTECT_ON equ 1FFF0000h ; 0X XXXX XXXX XXXX
PROTECT_OFF equ 1FFF2000h ; 1X XXXX XXXX XXXX

; *** DEVICE2 Fuses Definitions
FCMEN_OFF equ 3FFE0000h ; XX XXXX XXXX XXX0
FCMEN_ON equ 3FFE0001h ; XX XXXX XXXX XXX1
IESO_OFF equ 3FFD0000h ; XX XXXX XXXX XX0X
IESO_ON equ 3FFD0002h ; XX XXXX XXXX XX1X

interesting this DEVICE2 option... for those using PM

mackrackit
- 25th April 2007, 23:52
The guy use a 20MHz, so, should be something like HS_OSC instead of XT_OSC.
My mistake:o

rhino
- 26th April 2007, 00:27
I know when I was in school, they always made us flow chart out the process first. Would you be able to do something like that for us, because honestly, I'm a little confused by your program.
some examples...

INCLUDE "modedefs.bas"
DEFINE OSC 20
INPUTDATA var byte
X VAR BYTE
X = 0
MAIN:
PORTB.5 = 0
SEROUT PORTB.1,T9600,[1]
WAITLOOP:
SERIN PORTA.1,T9600,[inputdata]
if inputdata <> "A" then goto waitloop
LOOP:
IF (X<4) THEN
HIGH PORTB.5
PAUSE 2
LOW PORTB.2
PAUSE 2
X = X+1
GOTO LOOP
endif
goto MAIN




SERIN PORTA.1,T9600,[inputdata]



'What is the value of inputdata the first time this runs? If you are using "A" for a qualifier, the statement should be
SERIN PORTA.1,T9600,["A"],inputdata
'This statement will wait for until "A" comes in, then puts data after that into variable inputdata



IF (X<4) THEN



'I usually write
IF X<4 THEN

Did you ever get your hands on a PBP manual?

AlaskanEE
- 26th April 2007, 00:32
I'm trying to get the backlight of my LCD to light when a voltage high is recieved on a pin from a push button circuit. I'm testing to see if I can send A to the LCD screen then have it pause then send a B every time I input a voltage high. The loop works and it sends serial data then pauses then sends serial data then goes back to outputing low voltage till a high is recieved again. The problem is that the LCD just is showing solid squares instead of the leters that I am trying to send. I've looked up the ASCII binary, decimal, and hexadecimal equivolents for A and B and sent the numbers with %, nothing, and $ preceeding the numbers equivolently all with the same result. Here's my code.

@ DEVICE MCLR_OFF, PROTECT_OFF, WDT_OFF
INCLUDE "modedefs.bas"
DEFINE OSC 20
DEFINE LCD_LINES 2
ANSEL = %00000000
TRISB.1 = 0
TRISB.0 = 1
WAITLOOP:
LOW PORTB.1
if PORTB.0 = 0 then goto waitloop
IF PORTB.0 = 1 THEN
serout PORTB.1,T9600,[65]
pauseus 14000
serout PORTB.1,T9600,[66]
ENDIF
goto WAITLOOP

this is the code with the decimal notation being used. I don't understand should I just try sending A i.e. serout portb.0,t9600,[A] or is that wrong as well?

skimask
- 26th April 2007, 00:42
DEFINE LCD_LINES 2

If you are using a parallel mode LCD (Hitachi 44780 based), then PBP requires quite a few more defines to get it to work (see the manual).
If you are using a serial mode LCD (usually a parallel LCD mounted on a PCB with another PIC doing the decoding duties), then the DEFINE shown above isn't going to do anything for you. And you'll want to refer to the manual for the LCD.
And it would most likely help a lot if we knew what kind of LCD you were using...
Get the manual! And read it! We can help you with a lot of stuff...but again...I, for one, am not into hand-holding.

rhino
- 26th April 2007, 00:45
OK... now we're on a different subject.

What type of LCD are you using? If it is a serial LCD, you don't need the following line.

DEFINE LCD_LINES 2
If it is not a serial display and it has an HD44780 controller, you need some other LCD defines in there. But since I don't know, I'm going to assume it's a serial display. Next the serial part. Try...


serout PORTB.1,T9600,["A"]

Next, the blocks on the LCD... try adjusting the contrast.

edit: Looks like Skimask was quicker on the draw. Ignore redundant information from me.

AlaskanEE
- 26th April 2007, 00:45
I'm sorry, earlier I copied down my old code that was rittled with errors and didn't have the input and outputs set. Here is the new code:

INCLUDE "modedefs.bas"
DEFINE OSC 20
ANSEL = %00000000
INPUTDATA var byte
TRISA.2 = 1
TRISB.2 = 0
PORTA.2 = INPUTDATA
X VAR BYTE
X = 0
MAIN:
PORTB.2 = 0
WAITLOOP:
SERIN PORTA.2,T9600,[inputdata]
if inputdata <> "A" then goto waitloop
LOOP:
IF X<4 THEN
HIGH PORTB.2
PAUSE 2
LOW PORTB.2
PAUSE 2
X = X+1
GOTO LOOP
endif
goto MAIN

I want pin A.2 to be the input from the bluesmirf, which will be sending messages to our LCD via serial ports. The serial data will come into the pic through porta.2. Each message that is sent by the bluesmirf will be proceeded by the letter A. I'd like porta.2 to not accept any random data and only activate the loop when a message is recieved that is preceeded by the letter A. The output should be a high then low loop that loops four times. The output should come from portb.2

skimask
- 26th April 2007, 00:46
I don't understand should I just try sending A i.e. serout portb.0,t9600,[A] or is that wrong as well?

Yes, that is also wrong...
serout portb.0 , t9600 , [ "A" ]
which is also in the manual...
Your original line:
serout portb.0 , t9600 , [ A ]
will output the value equivalent to the variable A.

skimask
- 26th April 2007, 00:47
edit: Looks like Skimask was quicker on the draw. Ignore redundant information from me.

And I was just about to say to ignore redundant information from ME! :D

AlaskanEE
- 26th April 2007, 00:53
The LCD we're using is the serial enabled LCD SerLCD v2.5 it's default settings are 9600 bps with eight bits of data, 1 start bit, 1 stop bit, and no parity. I wasn't sure of the DEFINE LCD_LINES 2 command, but I figured it couldn't hurt since our LCD is 2 lines, and since the LCD is a serial input I didn't think I needed any of the LCDIN/LCDOUT commands.

AlaskanEE
- 26th April 2007, 00:57
yeah I forgot the quotes on A. It all made sense in my mind, if you could just stop being selfish and start reading other peoples minds this would be much easier ;)

skimask
- 26th April 2007, 00:57
The LCD we're using is the serial enabled LCD SerLCD v2.5 it's default settings are 9600 bps with eight bits of data, 1 start bit, 1 stop bit, and no parity. I wasn't sure of the DEFINE LCD_LINES 2 command, but I figured it couldn't hurt since our LCD is 2 lines, and since the LCD is a serial input I didn't think I needed any of the LCDIN/LCDOUT commands.

Ok, that's better.
You've got serout xxxx , t9600 , xxxxx
Try n9600 instead of t9600 and see what happens. Refer to your LCDs spec's to see which one you actually need.

rhino
- 26th April 2007, 00:59
Ok, give this a try...


INCLUDE "modedefs.bas"
DEFINE OSC 20
ANSEL = %00000000
INPUTDATA var byte
TRISA.2 = 1
TRISB.2 = 0
'''''''PORTA.2 = INPUTDATA 'don't need this line
X VAR BYTE
X = 0
MAIN:
PORTB.2 = 0
WAITLOOP:
SERIN PORTA.2,T9600,["A"],inputdata
'''''''''''if inputdata <> "A" then goto waitloop ' don't need this line
LOOP:
IF X<4 THEN
HIGH PORTB.2
PAUSE 2 'Question here... do you really want to pause for 2 milliseconds?
LOW PORTB.2
PAUSE 2 'same question here
X = X+1
GOTO LOOP
endif
goto MAIN

AlaskanEE
- 26th April 2007, 01:04
I made an earlier post asking about that. I'm using an external oscilator set up with a 20MHz oscillator and with the input and out puts going through 47uF capacitors to ground and their perspective input and output oscilator pins on the PIC. When I used PAUSE 500 for a half second pause, it paused for a lot longer than half a second. I lowered it down to 2 and it paused for about a second so I just went with it and just posted a question about it on here

mackrackit
- 26th April 2007, 01:08
See post 41 and 42

rhino
- 26th April 2007, 01:11
I made an earlier post asking about that. I'm using an external oscilator set up with a 20MHz oscillator and with the input and out puts going through 47uF capacitors to ground and their perspective input and output oscilator pins on the PIC. When I used PAUSE 500 for a half second pause, it paused for a lot longer than half a second. I lowered it down to 2 and it paused for about a second so I just went with it and just posted a question about it on here
I usually use 20pF caps. If you're having that much trouble with the PAUSE statement, I can't for the life of me figure out how the serial timing will ever work. Have you tried 15 (recommended in the datasheet) or 20 pF caps on the oscillator?

AlaskanEE
- 26th April 2007, 03:25
I switched to using the internal oscillator set to 4MHz to see if I could get the pause timing down and it worked. I also switched the serout baud rate setting from t9600 to n9600, but alas I'm still getting random output on the LCD. I'm trying to just get an "A" to appear on the LCD then a 10 second pause then have a "B" appear. This is the code I have:

@ DEVICE PIC16F88,INTRC_OSC_NOCLKOUT
@ DEVICE PIC16F88,PROTECT_OFF
@ DEVICE PIC16F88,WDT_OFF
@ DEVICE PIC16F88,PWRT_ON
@ DEVICE PIC16F88,MCLR_ON
@ DEVICE PIC16F88,BOD_OFF
@ DEVICE PIC16F88,LVP_OFF
@ DEVICE PIC16F88,CPD_OFF
@ DEVICE PIC16F88,DEBUG_OFF
@ DEVICE PIC16F88,CCPMX_OFF
OSCCON = %01100000 '4MHz
INCLUDE "modedefs.bas"
ANSEL = %00000000
TRISB.1 = 0
TRISB.0 = 1
WAITLOOP:
LOW PORTB.1
if PORTB.0 = 0 then goto waitloop
IF PORTB.0 = 1 THEN
serout PORTB.1,N9600,[$41]
pause 10000
serout PORTB.1,N9600,[$42]
ENDIF
goto WAITLOOP
end

the LCD seems to output random charichters but the ones that showed up most offten and in this order where: (). Should I try a different baud rate in my code?

Pic_User
- 26th April 2007, 04:36
Hi AlaskanEE,

If you are going to become an Analog Electrical Engineer this year, you got to get used to the terminology.:)

There are “clock oscillators”. These are little circuits that have 4 leads. They need 5 Volts and common supply (input) and have a signal and common output. Generally they are rectangle shaped and have similar pin spacing to a standard IC package with pins only near the corners. The signal output is an acceptable square-wave. These can be used with PIC Microchip. Not very often. These would not use capacitors on the PIC connection.
And
There are “crystals”. Crystals are used to help an external (external to the crystal) circuit maintain a “rock solid” frequency. Crystals are used internal to the “clock oscillators”. Crystals are passive devices and generally have two leads. A crystal cannot oscillate without additional components. Some type of active circuit, with positive feedback is usually used. The PIC has all the components needed for oscillating with a crystal. Except, the xxpf capacitors to common, on each crystal lead.

In light of the above this is difficult to understand:
I'm using an external oscilator set up with a 20MHz oscillator and with the input and out puts going through 47uF capacitors to ground and their perspective input and output oscilator pins on the PIC.

skimask
- 26th April 2007, 05:03
Start small and work your way up!
I don't know how much programming you've done, if you've made a blinky LED, follow a switch, etc.etc.
The program below should (according to the datasheet) reset the LCD back to defaults (forget about that switch, the backlight, the serial communications, etc.) and just output the alphabet, one character every 1/4 second and repeat itself over and over again...

@ DEVICE PIC16F88,INTRC_OSC_NOCLKOUT
@ DEVICE PIC16F88,PROTECT_OFF
@ DEVICE PIC16F88,WDT_OFF
@ DEVICE PIC16F88,PWRT_ON
@ DEVICE PIC16F88,MCLR_ON
@ DEVICE PIC16F88,BOD_OFF
@ DEVICE PIC16F88,LVP_OFF
@ DEVICE PIC16F88,CPD_OFF
@ DEVICE PIC16F88,DEBUG_OFF
@ DEVICE PIC16F88,CCPMX_OFF
OSCCON = %01100000 '4MHz
INCLUDE "modedefs.bas"
ANSEL = %00000000
TRISB.1 = 0
TRISB.0 = 1
dataout var byte

Waitloop:
serout portb.1 , n9600 , [ $32 ] 'according to serlcdv2.5 datasheet, should reset LCD back to 9600 (defaults) if it's stuck on some other baud rate

for dataout = 64 to 89
serout portb.1 , n9600 , [ dataout ]
pause 250
next dataout

goto waitloop
end


Also, according to the datasheet, are you even seeing the 'splashscreen' during power up? If not, you've got other problems. Read the datasheet, you'll see it.

EDIT:
I forgot to mention...
The 4mhz internal oscillator isn't exactly accurate. If you're getting random characters, that might be the reason.
9600 baud is at the upper end of SEROUT's usability at 4mhz. In this case, it should be ok, but if your 4mhz internal oscillator is a bit low, it might end up being TOO low.

AlaskanEE
- 26th April 2007, 05:12
I've fixed the external oscilator problem, changing out the caps with lower valued ones worked. Now to work on getting the LCD to time corectly output the data. Just to make sure 20MHz should be able to handle a 9600 baude rate without any trouble shouldn't it? Also is there and extra code I need to add to ensure stable operation outside of '@ DEVICE PIC16F88, HS_OSC' and DEFINE 20?

skimask
- 26th April 2007, 05:16
I've fixed the external oscilator problem, changing out the caps with lower valued ones worked. Now to work on getting the LCD to time corectly output the data. Just to make sure 20MHz should be able to handle a 9600 baude rate without any trouble shouldn't it? Also is there and extra code I need to add to ensure stable operation outside of '@ DEVICE PIC16F88, HS_OSC' and DEFINE 20?

20mhz is plenty high to use with 9600 baud (Appendix A of the PBP manual).
DEFINE 20 is not the correct usage for that DEFINE (Section 4.16)

AlaskanEE
- 26th April 2007, 05:47
I know I forgot to put OSC between DEFINE and 20. Anyways here's the code I used trying to get an alphabet output to go through using the 20 MHz external oscillator. the LCD showed a new character every .25 seconds but they were all random characters. Seems like a timing issue to me.

AlaskanEE
- 26th April 2007, 05:51
ohh I also tried the original code that skimask used working with the internal oscilator, it gave the same result, successive random symbols and leters.

skimask
- 26th April 2007, 06:00
ohh I also tried the original code that skimask used working with the internal oscilator, it gave the same result, successive random symbols and leters.

Again, generally, random symbols and characters usually mean the baud rate is just a tad too far off. And I know you're not this far, but 'generally speaking' (not a hard fact, but usually accuracte), if the baud rate is a bit slow, you get framing errors, too fast gives overrun errors.

AlaskanEE
- 26th April 2007, 06:18
is it possible for me to use a baude rate other than 2400bps or 9600bps?

skimask
- 26th April 2007, 06:21
is it possible for me to use a baude rate other than 2400bps or 9600bps?

Here's a program for you:

MAIN:
LCDOUT "See the manual as noted in earlier posts."
Goto Main

rhino
- 26th April 2007, 06:50
See the manual as noted in earlier posts.
Yep.... I think it's time to stop.... take a deep breath.... do a flowchart of what you want this project to do. Draw out a schematic, write your code, then post it all here. There seems to be a lot of jumping around to different problems. We're sixty some posts along now, and I'm not sure if you're making any progress.

rhino
- 2nd May 2007, 06:58
AlaskanEE -
Are you still out there?

skimask
- 2nd May 2007, 14:25
AlaskanEE -
Are you still out there?

Maybe he found the manual and, more importantly, read it. And now he's learned so much good stuff, that he doesn't need our help nearly as much anymore.

Pic_User
- 2nd May 2007, 14:40
Maybe he found the manual and, more importantly, read it. And now he's learned so much good stuff, that he doesn't need our help nearly as much anymore.
And of course we will now see him, back here helping others!:)
-Adam-

skimask
- 2nd May 2007, 15:06
And of course we will now see him, back here helping others!:)
-Adam-

Exactly what I was thinking.
Does it work any other way?