Jump to content

Morlan

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Morlan

  • Rank
    Newbrie
  1. Morlan

    Analog In Picc

    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
  2. Morlan

    Sourceboost Ide Won't Compile Any Program

    Hi, I know the problem. AVAST is really bad!! it thinks that the linker binary is a trojan virus. I placed an exemption on the file itself, everything in the install directory .. and guess what ... avast! doesn't like reading its OWN exception system. I submitted the file response that the file has been tagged incorrectly and nothing happened on the next update. As a win32 developer I understand the importance of making sure that important .. no VITAL .. systems like exceptions in an AVP are, I've had problems with this before of the same nature, thinking something I wrote was a virus, and because of that I could not launch the software as I hoped. I even phoned them up and tried explaining this to them and they insisted the file "must have become infected" even tho I had only just linked it to binary. I would suggest that SB contact them (btw SB: you can sue them for undermining an established product thereby reducing your saleability) Morlan.
  3. Hi, This is my first post ... Pleased to meet you all. A little about me before I start explaining my problem. I'm fair new to PIC programming but not C or C++ (I prefer C). I've been coding with various API's and libraries inc the useual ANSI, MU*, Linux, Win32, Win16 and some almost unknown 8Bit variations (some I founded myself, now obsolete). I've pretty much nailed the basics on my own with PIC programming using MPlab and SourceBoost. But only on digital platforms. I've VERY limited electronics knowledge but learn quickly. I've been harvesting parts from old equipment and using those in some test applications. (Its cheaper to buy a £15 toy and get like £30 worth of steppers and other stuff from it) Ok, here's my problem. I'm trying to learn about using analog devices on PIC's, the 1st one im trying is on a PIC16F627 which seems good for practising (really high tolerances as I seem to be finding the right resistor values by trial and error lol) I've enabled the comparator (the 627 has no ADC) ive put it in mode for dual independent comparators. ok, I'm only trying to use one at the moment and set it on RA0:RA3. Im supplying a resistor between the 5vp and the comparison pin, and trying to detect a value on the other one. BUT i dont see it doing anything more than acting like a digital input. The comparison pin is showing a value of 0 as the volt value is below the logic threshold and by changing the resistance value on the other pin (RA0) is only showing 1 when the value is above the same threshold. just like normal TTL. How am I supposed to be "seeing" an analogue value on that pin? This is the section within the main loop that is supposed to be checking for one pin to be higher than the other (hardware: a pot on each pin, it should light the LED linked to RB3 when one pin has higher value than the other) if (porta.0>porta.3) { portb.3=1; delay_ms(100); } The comparator is configured with this word: 0b00000100 (or 0x04) Which should be comparators in dual independent mode with no inversion or outputs. I know it shouldn't effect it as I'm not using an interrupt but intcon is set to 0; Anyone that can help me learn about using analogue devices on a pic (both with comparators and ADC's) would be MOST helpful. I just need to be able to "see" a intergeric value for each input. (i have other PIC's too including an 16F84 series and some other 62X's) Morlan
  4. Hi, I bought a CD package of your products (BoostC) from maplin i only have 1 key that unlocks the compiler and basic plugins. Should I be able to unlock more? Morlan
×