Author |
Message |
Topic: int16 over rs232 |
wgalaugher
Replies: 15
Views: 24443
|
Forum: General CCS C Discussion Posted: Wed Sep 14, 2011 3:28 pm Subject: int16 over rs232 |
I finally got it. I understand most of the code except for this part
signed int16 wait_for_number(int16 loopfor)
{
int16 temp=0;
int8 chr;
do {
if ... |
Topic: int16 over rs232 |
wgalaugher
Replies: 15
Views: 24443
|
Forum: General CCS C Discussion Posted: Fri Sep 09, 2011 1:11 pm Subject: int16 over rs232 |
Good lesson for me. Never make any assumptions about what people think you mean.
What I trying to do with this code is to type in 4 digit via RS232 with a carriage return so the PIC will assemble ... |
Topic: int16 over rs232 |
wgalaugher
Replies: 15
Views: 24443
|
Forum: General CCS C Discussion Posted: Fri Sep 09, 2011 8:40 am Subject: int16 over rs232 |
Added "errors" to the RS232 but still the same result. If I type in 4 numbers only the last two digits show and it hangs. It seems so simple. |
Topic: int16 over rs232 |
wgalaugher
Replies: 15
Views: 24443
|
Forum: General CCS C Discussion Posted: Thu Sep 08, 2011 11:52 pm Subject: int16 over rs232 |
Got it to compile. Not getting the correct result. It should show the value of the numbers typed. It only shows the last 2 digits once, then hangs
#include<18F2620.h>
#fuses HS,NOW ... |
Topic: int16 over rs232 |
wgalaugher
Replies: 15
Views: 24443
|
Forum: General CCS C Discussion Posted: Thu Sep 08, 2011 10:11 pm Subject: int16 over rs232 |
#include <EX_SISR.c>
#fuses HS,NOWDT,NOPROTECT
#use delay(clock=20000000)
#use rs232(baud=4800, xmit=PIN_C6, rcv=PIN_C7,STREAM=seriale)
signed int16 wait_for_num ... |
Topic: int16 over rs232 |
wgalaugher
Replies: 15
Views: 24443
|
Forum: General CCS C Discussion Posted: Thu Sep 08, 2011 9:40 pm Subject: int16 over rs232 |
Semicolons removed but no joy. I get the same error! |
Topic: int16 over rs232 |
wgalaugher
Replies: 15
Views: 24443
|
Forum: General CCS C Discussion Posted: Thu Sep 08, 2011 9:19 pm Subject: int16 over rs232 |
I added the code to the Ex_SISR code
I get a consistent errr that I cannot find.
Executing: "C:\Program Files\PICC\Ccsc.exe" +FH "..\serial\Serial.c" +EXPORT +DF +LN +T +A +M ... |
Topic: eeprom write problem |
wgalaugher
Replies: 7
Views: 10894
|
Forum: General CCS C Discussion Posted: Sun Aug 21, 2011 9:06 am Subject: eeprom write problem |
The use of Fram is terrific.
My first questions are:
Using Fram or eeprom
1. Can I use the code as is to read the text file and load the eeprom?
2. What if I don't have a page of data? |
Topic: eeprom write problem |
wgalaugher
Replies: 7
Views: 10894
|
Forum: General CCS C Discussion Posted: Sat Aug 20, 2011 4:21 pm Subject: eeprom write problem |
Did this code ever get resolved; it looked like it was left in limbo.
I think this could, with a few mods, serve as the basis for what I am trying to do.
I'm trying to read a text file containing ... |
Topic: Table search algorithm |
wgalaugher
Replies: 23
Views: 26690
|
Forum: General CCS C Discussion Posted: Fri Aug 19, 2011 8:29 pm Subject: Table search algorithm |
Your interpretation of the problem works perfectlly. I have wrestled with this for some time. It's nice to see the logic work. Basically, this is a universal band switch determined by frequency. |
Topic: Table search algorithm |
wgalaugher
Replies: 23
Views: 26690
|
Forum: General CCS C Discussion Posted: Thu Aug 18, 2011 5:28 pm Subject: Table search algorithm |
I got the above code working as advertised but I need a modification to make the project work.
Below is a snippet from pbasic that does the job but I'm having a hard time to convert the code to CCS
... |
Topic: Table search algorithm |
wgalaugher
Replies: 23
Views: 26690
|
Forum: General CCS C Discussion Posted: Thu Jun 16, 2011 3:08 pm Subject: Table search algorithm |
Thanks guys. Its too bad I need a 2x4 across the forehead. I think age is creeping; no one in his right mind should be learning C at 70.
All is working and I learned alot along the way |
Topic: Table search algorithm |
wgalaugher
Replies: 23
Views: 26690
|
Forum: General CCS C Discussion Posted: Thu Jun 16, 2011 2:02 pm Subject: Table search algorithm |
I guess I'm a bit thick; hate to admit it. I think a character is a byte and 7001 is 2 bytes. It may seem obvious but I don't know how to fix it. But I want to learn. |
Topic: Table search algorithm |
wgalaugher
Replies: 23
Views: 26690
|
Forum: General CCS C Discussion Posted: Thu Jun 16, 2011 9:50 am Subject: Table search algorithm |
I see the logic of the new code. It compiles without error but returns a position of 0 for any value. I played with the variables to make them int16 but it seems to be stuck with the original proble ... |
Topic: Table search algorithm |
wgalaugher
Replies: 23
Views: 26690
|
Forum: General CCS C Discussion Posted: Wed Jun 15, 2011 11:20 pm Subject: Table search algorithm |
I got the code working as advertized.
When I filled the array with the following:
char array [] = (1800,2001,3500,4001,7000,7351,10100,10201,14000,14351,18068,18169,21000,21451,248 ... |
|