Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Daz

  • Rank
  1. Hi everyone, After a couple of years I am re-visiting my temperature conversion headache. The PIC is an 18F2525 @ 4MHz. dq is the I/O pin on RB0. The code below works to the point where the value displayed on the lcd is a large non sensical number that fluctuates. The problem I have is with the conversion formula (I have looked at and tried many versions found on the 'net'). It may be that I cannot use the 'float' command as my version of sourceboost ide doesn't support it (v6.40). Could one of you clever people take a look at my code and suggest a way around this problem. Many thanks in ad
  2. Thanks for your replies. A fundamental error on my part using rb1 as a switch input instead of rb0, the simulator now works. In the while loop this code amendment below works correctly. I hope these posts will serve to help others with similar problems. //Endless loop while( 1 ) { if(flag1) { led1 = !led1; //on/off flag1 = !flag1; //reset } }//while
  3. Hi, I've been away from the programming arena for some time now and I'm just on a personal re-fresher course. Please find below a program that uses 1 switch input to turn on an led. The program doesn't work when I run it in the sourceboost debugger. The breakpoint set in the ext int routine is never reached and therefore the led never lights, it may be obvious to you experienced guys out there any pointers would be apreciated. Thanks in advance. #include <system.h> //Target PIC16F877 configuration word #pragma DATA _CONFIG, _PWRTE_ON & _BODEN_OFF & _WDT_OFF & _L
  4. Hi IanM, At last someone who understands english. I will do as you've suggested, thankyou. Regards, Daz.
  5. The A2D has been performed and I want to display the result.
  6. Hi, Probably a simple answer to this. I have comms using an rs232 line driver to the pc (sourceboost terminal) displaying letters numbers and strings, so far so good. I want to display the results of an a2d conversion, any clues please. Regards, Daz.
  7. Still cannot get it working. Does anybody have a working version of code for a2d conv. on a 12f675 that I can compare to?
  8. Thanks for replying so promptly, it really helps to have another pair of eyes look at a problem. I will change the code as you've suggested and hopefully get some good results. p.s. Dave, Pavel will the IDE simulator have the facility to simulate 12f*** pics' soon?
  9. Lets try it this way. #include <system.h> //Target PIC12F675 configuration word #pragma DATA _CONFIG, _PWRTE_ON & _BODEN_OFF & _WDT_OFF & _CPD_OFF & _INTRC_OSC_NOCLKOUT & _CP_OFF //Set clock frequency #pragma CLOCK_FREQ 4000000 //Outputs volatile bit gp0@GPIO.0;//analog i/p volatile bit gp1@GPIO.1;//analog i/p volatile bit gp2@GPIO.2;//motor drive volatile bit gp4@GPIO.4;//enable volatile bit gp5@GPIO.5;//motor drive #define motor_clockwise gp2 //pointer travels up #define motor_anticlockwise gp5 //pointer travels down
  10. Hi, I am trying to get the a2d to work with a 12f675. Has anyone any experience with this pic? I have simulated the a2d using a 16f877 with sourceboost IDE, but unfortunately cannot simulate with the 12f675. Can anyone see where I'm going wrong. CODE #include <system.h> //Target PIC12F675 configuration word #pragma DATA _CONFIG, _PWRTE_ON & _BODEN_OFF & _WDT_OFF & _CPD_OFF & _INTRC_OSC_NOCLKOUT & _CP_OFF //Set clock frequency #pragma CLOCK_FREQ 4000000 //Outputs volatile bit gp0@GPIO.0;//analog i/p volatile bit gp1@GPIO.1;//analog i/p
  11. Ok, thanks. Will they be supported as I'm sure I will not be the only one with this headache? Over to you guys, Dave and Pavel! Regards, Daz.
  12. Hi all, I am trying to print letters sourced from an array onto a lcd. char array[2] = {'a','b'}; unsigned int i; for(i=0; i<2; i++) { lprintf("%C",array[i]); } Using "%C" or "%S" does not work. Regards, Daz.
  13. Hi all, I'm using the SPI feature on a 16f877. Does anyone know how I would go about accessing memory location 0x80 of a slave device and writing or reading the contents of sspbuf to or from it? I can read and write to the slave at the moment, but I need to read / write to specific memory locations. Regards, Daz.
  14. Thanks emte, At last it makes more sense, I will now re-evaluate and hopefully get the desired result. Regards, Daz.
  15. Obviously the 'oo' function code doesn't work as expected (proved by the lack of replies).
  • Create New...