Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by TTom

  1. Jorge.... The example you have given me is awesome. I have a question about the line: *sPtr = '\0'; // Place the null terminator of the string I am assuming that when the program gets done with the for loop, it will have incremented the sPtr to one memory location beyond the Destination string, Is that correct ?
  2. Jorge... Thanks for the advise... I think I will try the specific code in "C" on my PC before trying it on the PIC. I've never used the 8051, however I know it is a very popular chip. If my memory serves me correctly it was used in keyboards, maybe still is. I actually started with the 8080 back in 1980.
  3. Jorge... Oh yes, I read the explanation, and reread the explanation, and I understood it completely. Since I was going to use 66 values,( I start out with just 6 just to get it to compile) I wanted to start the array at the beginning of a user block of memory. If you will check out the 16F886 you will find that the starting address 0xA0 would give me 80 bytes of continuous memory. However at this point I see another problem. The "int" is 16 bits wide, so I am going to have to use the "char" instead of the integer sinc
  4. So this is basically what I want to do: int x; int y; int arr[] = {65,22,39,48,57,66} // Create an array x = arr[y]; // where y is some value from 0 to 5 ..... Get some value out of the array
  5. richardc... The reason I put the address location is because that's the way the BoostC document showed on page 50. I realize now that I don't need to do that but I was just trying to do something to make it work. The line....int arr[6]@0xA0 = {65,22,39,48,57,66}; will compile so I figured it worked. But my problem now is to try to get the values out of the array and put them in a variable. Say: x = arr[0]; But this code doesn't compile. I would also like to write an expression that would contain a variable that would point to a value in the array. example : x = Some expression using the
  6. So.. If I create an array with : int arr[6]@0xA0 = {65,22,39,48,57,66}; int x; I want to write an expression that takes the value of the first number and put that value in a variable, say x... Such as: x = arr[0]; But this does not compile. Then I want to be able to put a variable into the expression instead of using a fixed value so I can sequence through the array.
  7. Jorge... Thanks so much. I will work with this and see what I can do.
  8. How do I point to the first value in the array and get it's value into a variable ?
  9. OK ... Now I have learned how to declare and fill an arrey with: int arr[6]@0xA0 = {65,22,39,48,57,66};
  10. Jorge... I was wondering where you were.. I am new to "C" , so I will make a lot of mistakes... What should the code look like ? I just tried anything I thought might work. How do I access the values in the array ? I am assuming I need to use pointers, but I don't know how. I have been looking on the Internet, but the programs are very involved... I need to start out simple and then go to complex.
  11. Amazing... I forgot to put the semicolon at the end of the lines of code. int arr[6]@0xA0 #define arr[1,2,3,4,5,6] When semicolon added it compiles
  12. Maybe I should just use the RETLW command and go to assembler. From what I can determine Sourceboost BoostC has about the worst error declarations I have seen in any IDE I have worked with. i.e "general error" - that is vague and useless.
  13. According to the Reference manual on page 50 I don't see why my code fails. I have started with : int arr[6]@0xA0 #define arr[1,2,3,4,5,6] If I can make an array of 6, I should be able to make an array of 66
  14. Actually I need to get more information on Arrays, not strings. I need to know how to: Fill and array with values, and access that array.
  15. I need to find some sample programs using strings. Can anyone help me ? I need to send 66 packets of information out PORTA that are 2 bits wide.
  16. Jorge - Thanks for helping me. Is there a way to close out this thread and give you credit ?
  17. Jorge - I am using MPLAB 8.70 - So is this correct...... Well.... I'm trying to paste a Jpeg of the window that I have entered my script in, but I'm having no success. I have tried to paste using Ctrl+V from the Copy and Paste process. I have tried copying from Word and using that option. Is there a server that we can use to share Jpegs, so I can use the URL option.
  18. JorgeF - Thanks for your help. So let me make sure I am doing this correctly: In MPLAB, I go to "Project" then "Build Options" then "Project" then at the very bottom in the text box that is labeled "Additional Command Line Options" I enter the text -rt Is this correct ?
  19. Raghunathan - I just want to thank you for your excellent files for beginners. These are just what I need to learn "C" programming in BoostC. I can't thank you enough for taking the time to help those who are just getting started, like me in learning "C" . I read the documentation, but without the examples the documentation does not mean nearly as much. I had some trouble at first . For some reason when I copied your examples off the Internet and pasted them into Notepad, then copied them from Notepad into the Workspace they would give errors. All the text looked the same, but they wou
  20. JorgeF - Thank you sooo much for your response. Your information is what I have needed. So now how do I set the "-rt" (rom top) switch on my linker options. I don't know how to use the Linker YET.
  21. Does anyone out there know how to write a linker file for the Pic16F886 which will resolve this problem ? "Warning: ICD2 Reserved ROM address range:0x1F00-0x1FFF (use linker -rt option)"
  22. I tried removing the include line with ICD2. I also tried programming in release mode. Gives same error.
  23. I am new to "C" programming. I have previously done all my programming in Assembly code. I am using MPLAB IDE 8.70 and boostC. My Interface is ICD2. The chip I am programming is a PIC16F886 which I have almost completed in assembly. My computer crashed and I lost all my recent programs, but I would like to learn "C". The files I am trying to use were found on the Sourceboost web site for beginner, beginners which are excellent programs to learn from. The problem is if there is an error I do not know where to resolve the error. Please find attached the program and the output window.
  24. I am new to Programming in C, and new to SourceBoost. I have taken a program off the web to get started. I am using is MPLAB 8.7 and the ICD2. Here is my program: //*************************************************************************************** // Example code for EZ-Controller available from http://www.sourceboost.com/Products/Products.html // // EXAMPLE CODE TO SHOW HOW TO FLASH A LED // YOU JUST HAVE TO CONNECT A LED TO PORT RB7 THROUGH // A 330R RESISTOR |\ // ______/\ /\ /\ _____| \_________ // RB7 \/ \/ \/ A | / K GND //
  • Create New...