Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by ra68gi

  1. Hi jwilson, I can see that all the characters from the weight indicator is not printed on the hyperterminal. smiley is some special character( >127 <= 255). why is the load digits not printed. try to get some information regarding serial comm of the indicator. Like say if its got modbus protocol. does it have parity etc. I have worked with similar project. In fact I have constructed a load indicator which sends out 6 digits using TI's adc chip & PIC16F876. Apart from load it also outs encoder value(for displacement). For all my testing I use hyperteminal with no problems. I
  2. Hey Guys, I was working on A ps2 keyboard emulator project. A very unique communication protocol. Its similar to RS232 with 8 data bits, 1 odd parity, 1 start & 1 stop bit. It also has clock. Both the clock pin & data pins of the Keyboard is open-collector. So I used the weak pullups of the portb pins for this application. All these days I was of the impression that the PS2 of the key board outs the ascii value of the key character. Only after browsing the net I realised that its got a different set of make code. I needed to verify if my code generated a glitch free wave form &a
  3. Hey guys, I suppose the LED block in the simulator indicates the status of the i/o pin. With PIC16F72 & weak pull-ups enabled(option_reg.7 = 0) & with trisb still in 255, the LEDs in the port is in the OFF state, where as its got to be ON. This happens right at the intialization itself not after any read modify write operation. ie. as soon as instruction option_reg.7 = 0; gets executed. but if this instruction is commented out, then the LEDs are in ON state. Any reason why ? with NO pullups the input pins would be floating. There could be any charge or voltage between vss to v
  4. Hi Alex, U are right. I did'nt realize that synchronous USART did not have start bit & stop bit and went on to program & test my code. Well, I need to employ some other technique. Actually the ps2 keyboard format is 11 bit data length. I suppose the start bit can be of the same length as rest of the data bits. Let me try using the pwm pin for the clock and load the data bits in tmr2 - pr2 match interrupt(ISR). The data gets validated on the low of the clock pulse. thanks, Raghunathan.
  5. No the driver uses or emulates an asynchronous UART Hi asmallri, I was writing a code to emulate a PS2 key-board, so that data can be printed on any word processor. The keyboard uses 8 data bit, odd parity(9th bit) in rs232 data format with a sych clock(synchronous mode). They say the baud rate is some where near 20kHz to 30kHz. Regards Raghunathan.
  6. Thanks very much Pavel. One more help required. Can u give the code for div64. with that I should manage to complete most projects. Regards Raghunathan.
  7. Hi, I am having situations in which I need to multiply two longs resulting in a data larger then 32bits. Is is possible to include a 64bit data type in boostc ? Regards Raghunathan.
  8. Hi, I want to know if the rs232_driver.h of souce boost be configured for 9bit synchronous mode? Regards Raghunathan
  9. Thanks, I got it to work. These were my findings while testing.. 1) When I plugged my device to different usb port on the laptop the device goes thro' the detection process again and a new com port no. is assigned. 2) Many times I am unable to access the com port with "unable to open com port" message displayed by windows. Can it be made more reliable so that we can use it for real time Industrial projects? I use serial port extensively for may of my industrial projects. When I need to access data from different systems I am forced to use the PCI serial port addon card or the usb to ser
  10. Hi, I am using the usb_serial program from IAN's pic_pack demo example. I have built this program for PIC18F2550, downloaded the hex file into the chip, wired the chip in bus powered mode as shown in the schematic. Upon plugging into the system nothing comes up. I checked for the bus voltage & I got 5v with the right polarity. but when I checked the Vusb pin(pin15), I did not get any voltage. I suppose it should show around 3.3v. what could be wrong? Regards Raghunathan USB_SCHEMATIC_FOR_18F2550.zip
  11. Also called Data Acquisition time. Regards Raghunathan
  12. Thanks Tim for those tips. I will spend some more time going thro' the lib files try to understand the program & then burn the chip. I should be in a position to modify the code to suit my application. will get back to you when I face problems. Regards Raghunathan
  13. I would suggest connecting the hyperterminal to PIC16F690 to verify if it gets the right value & sends the right value. Regards Raghunathan
  14. I think your right. I have this from the version updates.. SourceBoost V6.92 (13-February-2009) BoostC/BoostC++/BoostBasic 1.Fixed LFSR instruction use in inline assembler. 2.Fixed bug when compiler generated incorrect code for expressions like (&First->a)->local_1 = 0x5555; 3.Obj files are now created in the same directory where source files are. Before this change obj files were created in the current directory. I try downloading the latest version. Thanks Raghunathan.
  15. I didn't tamper with the folder at all. I just down loaded the zip file today extracted all the files. opened Sourceboost Ide selected the project & hit build button. Anything to do with the linker options Regards Raghunathan.
  16. I did just that & this is what I got. Building... BoostC Optimizing C Compiler Version 6.92 (for PIC18 architecture) http://www.sourceboost.com Copyright(C) 2004-2009 Pavel Baranov Copyright(C) 2004-2009 David Hobday Licensed to RAGHUNATHAN PARAMASIVAM under Single user Pro License for 1 node(s) Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited ..\..\pic_pack_lib\pic_utils.c success BoostC Optimizing C Compiler Version 6.92 (for PIC18 architecture) http://www.sourceboost.com Copyright(C) 2004-2009 Pavel Baranov Copyright(C) 2004-2009 David Hobday Licensed to RAGHU
  17. In fact I even have a printout of the project. I tried building the same project ie. usb_serial and the compiler returned a fail. it says it couldn't find some of the .obj files. can any one say how to build this project(usb_serial) in the demos folder of pic_pack step by step like you would to a child? I confess Iam quite dumb. I want to know which are the files that need to be added to project etc.. The easiest thing would be to just burn the .hex file(only onto pic18f4550) & test it... and I only have a 2550 chip with me right now. Regards Raghunathan.
  18. Hi Reynard, The usb_serial folder also has two other .hex files in the name of usb_serial_works & user_serial. Do u have any idea as why these .hex are in this project file. Regards Raghunathan
  19. Hi guys, I wish to use PIC18F2550 for my usb-uart project. Since Source boost does not have its own library, I have to use the pic_pack lib provided by Ian Harris. I have lots of doubt, but let me start one by one. In his program usb_serial.c, they have used the following header files ie. .h files // Pic Pack includes #include "config.h" #include "pic_utils.h" #include "pic_usb.h" #include "pic_tick.h" #include "pic_timer.h" #include "usb_cdc_class.h" // System includes #include "string.h" #include "stdlib.h" #include "config.h" // If you'd like USB debug info out the serial conne
  20. Ahh thanks. So the output pin just goes high when the cmp is equal to the ref? What I'm trying to do is "see" an analog input value in code not just compare one with another, trying to do this with the comparitor, so does this mean I can only do this with the ADC? if so ill have to choose another device. Thanks Morlan Yes, you need to convert the analog signal to its digital equivalent using the builtin ADC of the PIC and then compare the digital values. Regards Raghunathan.
  21. Hi Moral, The comparators output is always hi or low. No inbetweens. Only the comparator inputs are analog.ie any voltage between Vdd to Vss. It looks from your program that you are doing a software polling to do a compare. If you use a hardware comparator then the comparator output pin will automatically go hi or low. The very purpose of hardware module is to remove the burden of the code on the mcu. Down load the data sheet of the chip & read how to configure the comparator. I have never used a comparator. I don't know if these comparator could be used as operational amps.like a b
  22. while(1); in the above program I think this is the mistake. Remove the semicolon. Regards Raghunathan.
  23. Hi a21, I have used 2X resolution for many of my projects. I mostly use ccp interruts for the encoder so that I can use INT0 and timer0 interrupts for other communication & timer applications. Be careful if you are using the timer1 bec' it need first a rising edge for it to increment in the counter. But that may not cause a big error when u will be using a 1024 ppr are above. This is just to inform you. My code will out the encoder counts onto a hyperterminal for you to view the counts. I use hardware uart at 115200 bauds. You can use the PIC16F876 to do this project. I have used
  24. Try sending without the timer interrupt & check it up just to rule out the timing problem else you might be writing into the TXreg to often before one transmit is completed. regards Raghunathan.
  25. Hi, Use the test program below. Here b0 is a character varable assuming values 0 - 255 that gets displayed on the LCD. b0 could be your adc variable which gets updated in the adc function.... if adc is 10bit declare variable as int etc. The lprintf commands can be seen in the source boost user manual. Pls down load the latest version of 2k free C compiler/IDE. You can find the user manual in the help menu of the IDE. #include <system.h> #include "lcd_driver.h" #pragma CLOCK_FREQ 4000000 #pragma DATA _CONFIG, _XT_OSC & _WDT_OFF & _CP_OFF & _PWRTE_OFF #define LCD_A
  • Create New...