ultra sonic with 18f4520

Discussion in 'Embedded Systems and Microcontrollers' started by saharsahar, Aug 23, 2010.

  1. saharsahar

    Thread Starter New Member

    Aug 16, 2010
    28
    0
    hi , does anybody can a brief summery of PIC40x2((aka 18F4520) for me . like the software for PIC40x2((aka 18F4520) ? and if the ADC of this microprocessor can support ultrasound to digital? how many inputs and outputs does it have? and finally does it support remotely controlled(wireless) ? if so, how I can do it.
    thanks a lot.
     
    Last edited by a moderator: Aug 23, 2010
  2. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    What you asked is not that much clear to understand, but here is few things about PIC18F4520.The ADC can sample 100ks/s ,max it can have 5 I/O port but all pins cant be used of port E and about remote control if you are asking about wireless data transfer then no,for that you need to connect external module ya it have SDA support for that.
     
    saharsahar likes this.
  3. BlackCow

    Active Member

    May 11, 2009
    65
    1
  4. saharsahar

    Thread Starter New Member

    Aug 16, 2010
    28
    0
    thanks all for your helpul information.
    one more question is that I'm gonna to use this microcontroller for a large data. as I found the RAM memory size of this uc is 1536 Byte, memory size 32768 , EEPROM menory size of 256 byte and program memory size of 16 Kwords. so does it support a large dataset? also what is the difference of these types of memory size? memory size and the other type of memory size like program emmory size?

    anf debjit625, would u please let me know what external module can be used?thanks all
     
  5. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    If you didnt got the datasheet, then download it now from the url provided by BlackCow ,the datasheet will give you a lot of answers you asked here,and as you asked ,".....what is the difference of these types of memory size?..." it seems you are new to microcontrollers?.The Program memory is a non volatile memory i.e.. when you store some data on these memory they dont forget even if you switch off the power,they are used to store the program, the code i.e.. instruction to mcu you download or burn your program at this memory.RAM its only used when the program is running to write and read temporary data ,and its a volatile memory.EEPROM is a non volatile memory where you can write and read data at runtime i.e.. when the mcu is running.
    In some mcu like 18F4520 we can write and read data to Program Memory also at runtime.

    For external module,their is a lot it depends on you like using ZigBee,Wi-Fi,BlueTooth and etc
    Microchip also provide many RF Transceiver chips for example MRF24J40 is a 2.4 GHz transceiver which support ZeeBee Protocol.For futher details visit their website.

    Good Luck
     
  6. saharsahar

    Thread Starter New Member

    Aug 16, 2010
    28
    0
    thanks debjit so much. it was really helpful for me.
    to go 1 step back, does anybody know what specification should the microcontroller have for a bat detection (bat detector using microcontroller). can anybody suggest a microcontroller for me? I'm really confused with the veriety of the microcontrollers especially I'm new in this area.
    Thanks
     
  7. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    I started with PIC16F84A, you will also get many tutorials for 16F84A over net,and for battery detection you need a mcu with ADC external or internal for example the chip above PIC18F4520 have an internal ADC module, then you can measure the voltage of the battery with a proper interface using it.

    Good luck
     
  8. saharsahar

    Thread Starter New Member

    Aug 16, 2010
    28
    0
    thanks debjit so much, then do you know if the A/D convert the ultrasound to digital ? or just audio to digital?does it need any specific technique?
     
  9. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    The purpose of any A/D convert is to convert a voltage level to a digital number.Now in case of PIC ADC module they do the same ,it will convert any voltage between 0 to 5 Volt to a digital number( in most PIC),if the voltage level is changing w.r.t time like AC (audio or ultrasound ) it will also convert it into digital number but the problem is how fast its changing and how fast you are sampling, if you fail to properly sample the frequency then you will get wrong result.The sampling frequency must be twice of the highest frequency to be sampled.Its called Nyquist frequency (have a google search).In practice 20 samples per period should be done ,I do it in order to get a good result.

    If you are sampling very high frequency then it is better not to use Microchip's PIC ADC module rather use any external like from "Analog Device" they have nice range of AD conveters.

    Good luck
     
    saharsahar likes this.
  10. saharsahar

    Thread Starter New Member

    Aug 16, 2010
    28
    0
    wow , debjit thanks a lot for your great answer. now I'm completely understand what is going on....Thanks again
     
  11. saharsahar

    Thread Starter New Member

    Aug 16, 2010
    28
    0
    debjit , instead of using the external ADC ,can I change my MC and instead use another one with the ADC supporting like 200k sampling per second( the highest freq is 100K, so considering the Noquist sampling theorem, 200K sampling per sec is required)?
    if so, do you have any suggestion which microcontroller/microcontrller family has this ability ? any suggestion, thought and recommendation is highly appereciated.
    Thanks so much.
     
  12. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    In theory it is possiable to sample 100KHz frequency with twice more then its frequency,but in reality if you sample it with 200Ks/s it will give you an error value ,so as per me you must atleast do it 20 times to get a proper value i.e.. 2Ms/s.

    Now if you are processing any signal whose integrity is not a main concern you could go for a low sample rate i.e.. 5 to 10 times of the highest frequency ,but as per me when high frequency is to be sampled and the integrity of the signal is a main concern you should use external modules as a result your mcu will get more time to process other things while the external ADC module is processing AD stuffs.

    As I said before Analog Device have a vast range of AD modules with very high sampling rates. URL : http://www.analog.com

    Good Luck
     
Loading...