Jump to content

asmallri

EstablishedMember
  • Content Count

    169
  • Joined

  • Last visited

Community Reputation

0 Neutral

About asmallri

  • Rank
    Enthusiast

Contact Methods

  • MSN
    asmallri@brushelectronics.com
  • Website URL
    http://www.brushelectronics.com
  • ICQ
    0

Profile Information

  • Location
    Western Australia
  1. Have you tried the test code? //////////////////////////////////////////////////////////////////////////// // Serial Communications Test Program // // Exercises the serial driver code in <rs232_driver.h> by reading and // writing to the serial port //////////////////////////////////////////////////////////////////////////// // Author(s): Andrew Smallridge // Date 17 November 2004 // // Copyright (C) 2004-2006 Andrew Smallridge // Copyright (C) 2004-2006 Pavel Baranov // Copyright (C) 2004-2006 David Hobday // Initialially developed on the PIC18F452 ////////////////////////////////
  2. The zener diode is approach is not suitable for your application. I thought I had already mentioned that in my initial post but having reread it I realized the omission. A zener diode has a tolerance of +/- 5% nominal (some are much worse) as well as a transfer function that varies with temperature. In addition you need to ensure you bias the diode to operate beyond the knee region. Here is a link that discusses these points: http://www.edn.com/article/CA426083.html In your application a +/- 5% tolerance means that the zener voltage variance, ignoring temperate is 2 volts.
  3. The previous responses were in context of the original question deviating from it when the original poster expressed more interest in understanding the mechanics. Once he undertands the mechanics he can choose the resolution that meets his requirements.
  4. You cannot just use a zener or you risk killing the PIC. You need to add at least a resistor from the PIC A/D input to ground. You are looking at a 4 volt range. Without using the vref inputs your A/D converter will do a conversion from 0 to + 5 volts. Assuming an 8 bit a/d converter the resolution will be 5v/256 = 19.53mv per bit. If instead you raised -vref to 1.0volts then the conversion range of the A/D is from 1 to 5 volts (4 volt range). IN this case the resolution is 4v/256 = 15.63mv per bit. If you were only interested in a 2 volt range then you could apply +3.0v to the -vr
  5. No it is not that easy. If the input impedance into the A/D input is too high, the input impedance impacts the measurement. What you want to do is relatively easy for do. It requires two resistor voltage dividers and two halves of a dual opamp. The first voltage divider is on your battery. You feed the output of the voltage divider into one half of the opamp configured as a voltage follower and the output of the voltage follower into the A/D input of the PIC. This now gives you a low impedance source. The second voltage divider comes off the + 5 volt rail and connects to the second ha
  6. Hey sdujolo, Nice discovery, I haven't seen that but I'll certainly give it a try. It would be nice for a logging application to be able to write directly to an SD card. Anyone else playing with this? cheers Ian. I have ported it to Microchip C18, C30 and CCS compilers but not to BoostC.
  7. I developed such a bootloader for the PIC24 family which bootloads from an SD/MMC card using the FAT file system. This bootloader was developed using Microchip's C30 compiler. I intended to port it to support the PIC18F family but it requires a lot of program memory to support the FAT file system and it therefore is really only viable for PIC18F processors that have a lot of program memory.
  8. The rs232 driver rs232_driver.h (actually serial interface driver) supports either the use of an embedded hardware USART in the PIC if it has one or the software emulation of a USART. You would use software emulation if either the PIC does not have an embedded USART or if, for some reason you cannot use the embedded UART possibly because you have used the PICs supported by the hardware USART for some unrelated function. Using the hardware USART is far far far better than the software emulated USART. The e_ designation on the driver variables signifies an emulated register with the same cha
  9. The driver supports only a single hardware UART however it will definitely work with the PIC18F8722.
  10. I think you misinterpreted what the driver is telling you. I have used this driver on 16F series PICs. The I2C driver was originally designed to emulate the hardware I2C found on a PIC18F series processor. From time to time Microchip improves the various peripherals found in the PICs. The reference to the 18F2xx and 18F4xx is intended to let the developer know that the emulation closely matches the I2C found in these devices. In this way a developer can reference the hardware peripheral information for the 18F series PICs listed to understand how to use the emulated I2C driver. There is nothin
  11. Unless you really are using Low Voltage Programming (very few hobbyists are) you want LVP_OFF
  12. Forget worrying. You can achieve reliable, rock solid 115200 baud operation with this configuration.
×
×
  • Create New...