Jump to content

thosey

EstablishedMember
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About thosey

  • Rank
    Newbrie

Profile Information

  • Location
    Lake Milton, Ohio
  1. Well, I have created a library and it works but I have a few questions about them. First off, If I produce a library that has no asm code in it but set the target for a SX device can I use this library for a pic device. What I am doing is setting up libraries for standard c libraries like ctype.h. I am not putting code specific for any type of device into it. Second in my header file I noticed that in the flash.h there is the following an can someone elaborate on it. #ifndef _flash_h_ #define _flash_h_ #endif what does the _flash_h_ mean? Is it the same as flash.h. Thirdly, I placed this ctype.lib in the library file under sourceboost and the ctype.h in the include file. I called the #include <ctype.h> and compiled and it cannot find the library. Do I need to set a path for the libraries like in borland c 3.1. I can get the program to work by adding to the workspace the library file and this will allow me to compile. But it seems that If I also add the header file it will allow me to see the parameters that need set in a popup window wich is great. I think that it should do this just by using the #include <ctype.h> in the program and it should locate the library without having to add it to the workspace. Or do I need to put in the header file where to locate the library. Forth and final, when I do compile I get a few warnings that I am not using functions. Is there a way to turn off these warnings as displayed below. Compiling... C:\PROGRA~1\SOURCE~1\C2C.EXE -PSX28AC -SRC -ols -md -O2 -IC:\PROGRA~1\SOURCE~1\INCLUDE\PSX28AC.INC -otest.asm TEST.C ..\LIB\CTYPE.LIB C2C-plus 5.3e C-compiler Copyright© 1998-99,2000-2004 by Pavel Baranov http://www.picant.com/c2c/c.html support@picant.com (Extended version) Licensed to: Timothy Hosey TEST.C ..\LIB\CTYPE.LIB Warning in a library: Possible truncation to 8-bit Warning: The function '_isalpha' was not called. Code generation skipped Warning: The function '_isdigit' was not called. Code generation skipped Warning: The function '_islower' was not called. Code generation skipped Warning: The function '_isupper' was not called. Code generation skipped Warning: The function '_tolower' was not called. Code generation skipped Optimized 0 instruction(s) Finished. Done Thanks for any response, Timothy Hosey
  2. I will concur with Stringer, I tried same program Compiling... C:\PROGRA~1\SOURCE~1\c2c.exe -PPIC16F84 -SRC -ols -md -O2 -Ip16F84.inc -oneg.asm neg.c C2C-plus 5.3e C-compiler Copyright© 1998-99,2000-2004 by Pavel Baranov http://www.picant.com/c2c/c.html support@picant.com (Extended version) Licensed to: Timothy Hosey neg.c neg.c(8): Error: General error Finished. Done Failed
  3. asimo, just wondering how you came up with the screen name. Is it from Isac Asimov, the writer of the three laws of Robotics from the March 1942 magazine publication Astounding the story called "Runaround" In wich he established his three fundemental laws of robotics. The most recent publication was with Robin Williams in Bicentennial Man (Movie), in which these three laws came in a holographic form from his heads holographic display. Or are you refering to the Honda ASIMO project which I would most likely believe was named after Asimov. It is such a striking resembelence it is uncanny.
  4. Don, I achieved this by accident this evening. I have a #define twice wich produced this error. Check all your #defines and make sure you didn't do two the same. Compiling... C:\PROGRA~1\SOURCE~1\C2C.EXE -PSX28AC -SRC -ols -md -O2 -IC:\PROGRA~1\SOURCE~1\INCLUDE\PSX28AC.INC -oHOSEY.asm HOSEY.C C2C-plus 5.3e C-compiler Copyright© 1998-99,2000-2004 by Pavel Baranov http://www.picant.com/c2c/c.html support@picant.com (Extended version) Licensed to: Timothy Hosey HOSEY.C line 92: EOF in comment 1 errors detected Preprocessor error Done Failed This can also happen I discovered later if you use the #include "xxxx.x"; and there is nothing but an empty file.
  5. swooshxx, the problem is due to no include file. Look at the menu settings then click options. In the include box there is nothing. Now set your target as a sx28ac. Also view your asm there is no settings defined. This is due to the fact that there is no Psx48bd.inc or 52 file put in the include file. Look at the other psx18.inc and Psx28.inc or Psx28ac.inc file for more. Me I even changed this since Pavel might be more into the pic side of it. I changed Psx28ac.inc to the following DEVICE SX28AC, BANKS8 DEVICE TURBO, OSCHS1, BOROFF DEVICE STACKX, OPTIONX FREQ 50000000 From what he had set up. DEVICE SX28L, TURBO, STACKX_OPTIONX ID 'C2C test' I would suggest making a new file called PSX48BD.INC under the sourceboost/include directory. Copy the following into it. DEVICE SX48BD DEVICE OSCHS1, BOROFF DEVICE STACKX, OPTIONX FREQ 50000000 Once this is done goto the menu settings then click options. When the toolbox comes up then copy the following to the include textbox. This is assuming that sourceboost is in the same local as mine. C:\PROGRA~1\SOURCE~1\INCLUDE\PSX48BD.INC Recompile and check your asm file your defines should be there now. On a side note the aformentioned routines have always worked for me.
  6. Pavel, I too have this happen to me also. Could you elaborate more. Is what you mean to write like in c++ a return of the main() function. Or am I misunderstanding this. I have been under the assumption that when building it has been envoking the sasm to quickly and this causes the error. Thanks
  7. James, I have here the code I believe you are looking for that will give the best results and very little space. I have been putting together libraries at this point and should be posting them in the near future. char swap_bits(char variable) { #ifdef _SX asm swap param00_swap_bits; #endif #ifdef _PIC asm swapf param00_swap_bits; #endif return(variable); } This is the code tht it returns in sx mode, pic should be very comparable except it would use the swapf and no bank instruction most likely. ;;;;;;;;char swap_bits(char variable) _swap_bits__code ;;;;;;;; { ;;;;;;;; ;;;;;;;; asm swap param00_swap_bits; swap param00_swap_bits; ;;;;;;;; ;;;;;;;; ;;;;;;;; ;;;;;;;; ;;;;;;;; return(variable); bank 010h mov w, param00_swap_bits retp ;;;;;;;; }
  8. Forgive me if this is a repost. Pavel, check your data this is a 14bit processor Taken from microchips pdf 41186b.pdf The PIC12F629/675 microcontroller products merge all the advantages of the mid-range x14 architecture and the flexibility of FLASH program memory into an 8-pin package. The PIC12F6XX devices feature a 14- bit instruction set, small footprint package, and a wide operating voltage of 2.0 – 5.5 volts. You could use the PIC16F630/676 and just write a header file so that gpio0-5 are recognized since they are called ra0-5 on this chip. Exactly the same chip except for naming conventions and pin count. I have the PICkit1 flash that I purchased from digikey for $35. Actually this is the only pic programmer that I have and for the most part I use the SX chips.
  9. Pavel, I would recheck those processors again they are in fact 14bit cores that has a great dev kit for $35 from digi-key. It is the Microchip PICkit1 flash. It will program via usb 8 and 14 pin chips. In fact this is the only pic kit that I do have. For the most part I use the SX chips. You can actually use the PIC16F630/676 to do testing right now since they are just extended 14 pin versions of the 629/675. You may just want to rename the ra0 to ra5 to gpio0 to gpio5 in a header file. Data from Microchips pdf on the processors. 41186b.pdf The PIC12F629/675 microcontroller products merge all the advantages of the mid-range x14 architecture and the flexibility of FLASH program memory into an 8-pin package. The PIC12F6XX devices feature a 14- bit instruction set, small footprint package, and a wide operating voltage of 2.0 – 5.5 volts. In addition, these devices offer an internal programmable 4 MHz oscillator, on-board EEPROM Data Memory, on-chip voltage reference and up to 4 channels of 10-bit A/D. These 8-pin microcontrollers provide the features and intelligence not previously available due to cost and board space limitations. With the flexibility of FLASH and an excellent development tool suite including a low cost In-Circuit Debugger (ICD), In-Circuit Serial Programming™ (ICSP™) and full ICE 2000 emulation, these devices are ideal for just about any embedded control application.
  10. Does anybody know how to produce cod file for the sx chips. I don't recall this ability in the sasm assembeller.
  11. I would like to see bit support. This would be very helpfull in boolean logic equates as well as setting pins. Example of this would be led=1; led=0; This would let the pin or bit selected to be conrolled like setb rc.7 clrb rc.7. Sorry pic users this is sx asm that I am using as example. This could be achieved via, bit led @0x07 (unsigned)&PORTC*8+3;; I would also like to see support for passing non const char pointers to functions. This would be very usefull.
×
×
  • Create New...