PG302 Linux logo
Home | Installation instructions | HOWTO | FAQ | Donate PCB | Contact

How to change/set basic settings for your microprocessor and programmer ?

  1. Settings 
  2. Setting serial port device 
  3. Setting serial port speed
  4. Setting size of microprocessor memory 
  5. Choosing the right microprocessor manufacturer
  6. Memory chip target (arhitecture) and destination
  7. Saving settings
  8. Loading settings

Settings

Default settings  are set for AT89c2051 on serial port /dev/ttyS0 (COM1).If you want to change this settings you will have to go over next steps. Check Saving settings for more information how to work with this software more efficiently. 

When you open program with pg302 command if will bring up main menu:

************************
 PG302 linux software
************************
--------------------
Current Settings
------------------------------------
Device:/dev/ttyS0  Flash Size:0800
Chip vendor:1       arh/dest:0
------------------------------------
key | function
(e) -ERASE
(p) -PROGRAMM 
(b) -BLANK CHECK
(r) -READ
(c) -CHECKSUM
(s) -SETTINGS
(w) -WRITE SETTINGS
(l) -LOAD SETTINGS
(q) -QUIT

Enter your choice here:

Press key s --->(s) -SETTINGS  and it will start asking you some questions : 

Setting serial port device

SET SERIAL PORT DEVICE(current=/dev/ttyS0)
==================================
Use current settings (y/n):n

Serial device:/dev/ttyS1

Above example shows how to set /dev/ttyS1 (COM2) for serial port device is using for programmer.

ttyS0 would refer to (COM1) on windows OS.

Setting serial port speed

This option doasn't on my programmer. I never tested this setting on Windows machine if that is just my programmer or it is something else. please report if higher boud rates work for you or not. Accept current default boud rate 9600.

SET SERIAL PORT SPEED (current=15)
=========================================
 B9600=13
 B19200=14
 B38400=15
 B57600=4097
Use current settings(y/n):y

Setting size of microprocessor memory

Following settings are different from those used on PG302 Windows software. In protocol it says you have to enter hex value for the microprocessor size. For example AT89c2051 has 2kB (2048 bytes) of memory. If we want hex number this size is translated to 0800 . You need to enter 4 characters representing size of microcontrollers memory in HEX format. Below you can see example for AT89c4051 which has 4096 B of memory.


SET FLASH SIZE (current=0800)
=================================
Use current settings(y/n):n

Set flash size in (example 0800) HEX:1000

Choosing the right microprocessor manufacturer

Depending on your microprocessor you have to enter right number for number of pulses. I'm not realy sure what exactly this mean in comunication with certain microprocessor. Anyway type number in that represents your manufacturer. Below is example for choosing AMD. If choose Atmel  1 would be coresponding number to type . 

Set chip manufacturer for number of pulses(current=1)
=====================================
 AMD = 25
 Atmel = 1
 Dallas = 5
 Intel (BH chips) = 25
 Intel (Other) = 5
 Philips = 25
Use current settings(y/n):n

Chip manufacturer:25

Memory chip target (arhitecture) and destination 

Choose the right arhitecture of your microprocessor and memory destination. Some of the microprocessors have their own EEPROM for memory storage some are serialy programmed (if you use ADT90 pg302 exstension)

Set destination arhitecture/memory dest (current=0):
=====================================
-0- for x51
-2- for serial x51 program FLASH
-3- for serial x51 program EEPROM
-4- for AVR, program FLASH
-5- for AVR, program EEPROM

 Use current settings(y/n):n

Chip destination:2

This was the last step of setup. If you want to know how to  save and load this settings. This settings are now only in your computers memory. 

Saving settings 

In main menu use (w) -WRITE SETTINGS to write this settings to a file. This file is stored in the location where you started program. You could have different projects in different folders with different settings that you need for a microprocessor you are working on. This comes very handy in those cases. By default pg302 uses settings for AT89c2051.There is no filename extension associated. Name for your file could be whatever you can think of. It choose name coresponding to your microporocessor type. Example below: 

(w) -WRITE SETTINGS
(l) -LOAD SETTINGS
(q) -QUIT

Enter your choice here:w

Filename:at89c4051

Your settings are now stored in filename named at89c4051 in your current working directory. (Where you started pg302)

Loading settings 

When loading settings you have to write exact file name and you shold start program in directory containing this file. You could optionaly write exact location for example : /home/myhomefolder/myproject/at89c4051. Example below : 

Enter your choice here:l

Filename:at89c4051


Press Enter key to return to menu->

If it all goes OK id doasn't return anything just like example above. should return something right ?? :))) Maybe I'll change that.