Jump to content

John_E

EstablishedMember
  • Content Count

    22
  • Joined

  • Last visited

Community Reputation

0 Neutral

About John_E

  • Rank
    Regular
  1. BoostC directly supports integer values only, no doubt you know this already. Floating point is not so easy, and I'm not saying how to do it here. However, what you are asking for seems to be a method to output a fixed point value, which is much easier than floating point, particularly if you are starting with integer calculations. For these, just scale them up as required. For instance, (42/9) for three places after the point is just ((1000*42)/9), with a decimal point to be inserted before the last three digits when it is viewed as decimal. Do the calculations as long integers if t
  2. Yes, it does stand for Integrated Development Environment. But to be pedantic (or just accurate ) this does not mean it is a compiler, builder, and editor. It is an integrated _environment_ for those parts. It is perfectly possible for them to exist separately. So, in accordance with this pedantry, the removal sofware should at least tell you that you are going to lose the whole lot. SourceBoost has boostbasic.pic16.exe, boostc.pic16.exe and so on as separate files in the directory, and since they executables and not DLLs they can be invoked directly, rather than through a parent pro
  3. Well, I sent that reply, then - Doh! (or D'oh!, opinions differ). The PIC16 16-bit timer, the two bytes are accessed in isolation. You have to do a bit of a dance to read them on the fly, unless you stop the clock to prevent an increment mid-read. The datasheets give some assembler rouines to assist. But I see on the PIC18F25252, there is means of full access to the timer1 16bit value without this. It just requires that the bytes are read in the low byte, high byte order. You probably knew this, but I had to look. I assume your part has this type of counter too. I haven't c
  4. The asm required to do this is not tricky, just copying bytes - a very reasonable occasion to try writing in assembler! Give it a go... Looking at: #define TIMER (uTimer*65536 + tmr1l + tmr1h*256) this is just assembling a longer value by chaining component bytes together. But you know that, it's what you want to do. Strictly speaking, uTimer*65536 will not produce uTimer shifted left 16 bits, unless uTimer is greater than 16 bits in length. Since it is type 'int', which the manual says is 16 bits, the result of this shift should always be zero. uTimer should really be a
  5. Header files are used to tell the compiler where all the features of a micro reside on the chip. All of the internal registers, etc. are defined in the header file, and each registers bit definitions are also listed. You should not need to create a header file, as Sourceboost comes with quite a lot of header files. You will find them in the "include" folder under "Sourceboost", i.e x:\Program Files\Sourceboost\include (where x is your local drive where SourceBoost is installed). If you are a beginner in C programming, I'd advise you to stay well away from creating your own header fil
  6. Sorry Dan, thats a pretty unfortunate set of circumstances, with it being the beginning of term at so many colleges and having heard so many stories before (ranging from "dog ate homework", "sister died", "I am an eminent professor and I need to check my answers before I set these questions to my students") I tend to be a little sceptical. A forum is not going to be the best place to get this resolved, forums are better suited to answering specific questions about a problem. BTW I believe Dave and Pavel who wrote SourceBoost do contract work, maybe the can help! See http://www.sourc
  7. You cannot use the rs232_driver.h for two UARTS without quite a bit of modification. You could duplicate the code (including constant definitions) and change the names to suit each channel, which would allow two UARTS. Watch out for clashes with port pins. You could then interleave transmission through either as you wished, but receive is a different matter, since attention would stay with the one UART until it succeeds or the WDT expires, and the other then might miss a start-bit (if s/w) or overrun (if h/w). Receive could work if you only care about attending to one channel
  8. The PICsimulator from http://www.oshonsoft.com/index.html has a terminal capturing the output from the simulated chip. The IDE will load assembler programs, and I have found his simulated peripherals work well. ( Pity it's a non-optimising compiler and somewhat eccentric editor.) I haven't tried putting BoostC generated assembler into the PICsimulator, but you never know, it MIGHT work. I have a licence, but there is a free trial anyway. John
  9. I agree with you, the situation seems improbable! Maybe they were not $USA... An electronics engineer who cannot execute a very simple program for the PIC using high-level tools? Who gives $10,000 IN ADVANCE for this! It's his school project, isn't it
  10. It's a mnemonic to remember the current and voltage relationship for inductors and capacitors in AC circuits. see: http://www.physicsforums.com/showthread.php?t=111419 Righto. I was taught CIVIL: Capacitor I leads V / V leads I Inductor I cannot post the mnemonic we were taught for the resistor colour code, it is not pleasant! John
  11. If nothing in C turns up, you might find this man's project useful: http://jap.hu/electronic/irtx_pic.html He has a program in assembler. John
  12. I have not tried the build-in terminal yet. I will check if I can help you. Can't see a reason why it should not work. << snip >> According to the 16F876 datasheet I just have to hand here, the UART polarity is normal for this chip - that is, the idle level is high, the start bit is low. This is opposite to the _RS232_ logic polarity, which is supposed to be -12V for 1 or 'mark' and +12V for 0 or 'space' (when loaded), with the idle level being 'mark'. The RS232 level not being a 0 to 5V signal, of course. Is the datasheet wrong? Like you, I always have to c
  13. I have not tried the build-in terminal yet. I will check if I can help you. Can't see a reason why it should not work. If I am not mistaken, the terminal in the Debugger can't be hooked into the program that is being debugged -- it just talks to comm ports on the computer that supports the Debugger. But maybe I'm wrong on this .... In another (more jugular) vein ---. From painful experience I have noted that on the 16F87x series of chips, the TTL output is inverted from normal 232 polarity. The Max232 type chips provide the necessary inversion to make everything OK at their o
  14. Hello ganavash Maybe these snips from the datasheet will help: "Note: If the global interrupts are disabled (GIE is cleared), but any interrupt source has both its interrupt enable bit and the corresponding interrupt flag bits set, the device will immediately wake-up from SLEEP. The SLEEP instruction is completely executed." "5.6 Timer1 Operation During SLEEP Timer1 can only operate during SLEEP when setup in Asynchronous Counter mode. In this mode, an external crystal or clock source can be used to increment the counter. To setup the timer to wake the device: • Tim
  15. Reinvent the wheel? That is a commonly quoted glib phrase, and of course can reinvention can only be done by someone who doesn't know the wheel exists already. In which case, of course, it's not re-invention for _them_, but possibly an act of genius. The wheel is frequently _redesigned_, however, and there are many manufacturers even of very similar wheels. Regards
×
×
  • Create New...