How to complie ?

Required Tools:

  • Visual C++ 2008
  • Hi-Tech PIC C Compiler

Required Hardware:

  • RS232 or equalivent(usb2serial conveters) interface
  • Any PIC microcontroller with Timer1 and USART
  • Other parts in the schematics

There is no specific PIC for this project if your selected device has a Timer1 and USART module that’ll be okay. (In the experiment I used pic16f74).
Now follow those steps

  1. Open .\soft\rand\build.cmd with any text editor and change the “–chip=16f74″ to your device
  2. Open .\soft\rand\firm.h and change the address of Timer1 accordingly. (The addres’ll be in the datasheet of device)
  3. Run build.cmd, download the rand.hex to PIC
  4. Build devman and devcom with Visual C++ (they are in .\soft\dev_lib)
  5. Copy devcom.dll and devcom.exe to Windows directory
  6. Open .\soft\devman.inf , change Port accordingly and copy to Windows directory

Library is ready to use now.  If you want to make a test, build & run rand_test. Device will start 10 seconds after power up.

For questions you can contact wtih me via email.

Why devman.exe don’t scan serial ports ?

Device isn’t plug & play. If some body disconnect or cut its power, that may cause unpredictable behaviour.

How can I change the baudrate ?

Change SPBRG in rand.c at line 121. SPBRG = [(20Mhz/16*BaudRate) - 1].
Change dcbConfig.BaudRate in devman.c at line 273 accordingly.

Write a comment