This page contains Japanese characters.
I have developed a program to get measured data of DSO ( Digital Storage Oscilloscope ). I named the program TDS.exe.
I have microprocessor unit boards made by Akizuki which is type of HD3664F. The board has a RS232 port.
So the board can send data to PC by RS232. I will replace DSO with the microprocessor unit, my old TDS310 is
noisy because of a big fan for cooling. And I want to measure more than 2 channels at the same time.
I resumed this project again in the end of August 2012. However, I will not be able to program a critical application
dependent on assemble level, because I lost the official hardware and programming pdf files by my HDD crush and
Renesas does not publish them in site now.
I could download the official hardware manual in Japanese from a site. Akizuki
tells that 3694F is faster version of 3664F. But we have not been able to download 3694F manuals from Renesas site now.
11:32 Sep27 GMT+9
I checked developing environment for 3664F to write a program for RS232. I list a few sites for referrence. My old PCs, 400MHz and 66MHz machines share files with Microsoft Network, so Linux developing environment is not good. To develop H8 software, There are mainly Akizuki, HEW by Hitachi and Best Technology. It seems that BestTechnology's GCC Developer Lite ( GDL ) is better. I tried download of GDL more than 5 times. The downloads stopped less than 5 minutes, so I asked to send CD-R. A site decribes some developing environments of HEW4, KPIT, Akizuki and YellowIDE. I downloaded HEW for H8 from Renesas. It took 22m 10s to download the size of 97.6MB. The transfer rate was 73.3 KB/S. I think that BestTechnology's server is poorer than Renesas. My Windows 98 machine failed to install HEW, because the HEW supports Windows 200 later. Both of KPIT and YellowIDE support Windows XP later. Although I installed Windows XP Home edition for GCC Developer Lite, I found an old version of it in a MO disk. I installed ver 22.214.171.124 from file GDLFull126.96.36.199.exe. It seems to work on Windows 98. I read 3664.txt file in the target directory. GDL supports serial commnunication in 3664h. I may write a communication program with PC. GDL had flash writer 2.7 in tool menu.
I downloaded and installed the latest version 188.8.131.52 of GDL. I wrote the process in my old PCs.
|IC1||HD64F3664FP||H8 microprocessor unit|
|X1||CSTCV16, 0MXJ0C3||Ceramic oscillator, 16MHz|
The bord size is 27.8x40.2xt1.6 mm. There are parts on both sides of PWB. All the parts are surface mount type except a crystal of 32.768kHz. Document is written on both sides of A3 sheet. The table shows parts that there are on part side. The C8 and C10 are very small 1x1.8, though their capacity is 1uF. There are RS-232 dricer/receiver and chip capacitors and resistors on the reverse side. The RS-232 driver/receiver, ADM232A charges up ±9V by 0.1uF capacitors. I will design a tiny circuit to try 3664F.
I found my old circuit drawing of AKI-3664. I will rebuild it for my practice.
I have a RS232 cable of 2m long which has female Dsub 9P connector at the both ends. I bought it for interlink between PCs 15 years ago. AKI-3664 flat microprocessor unit shows a base board circuit in the document. The circuit connects TxD with P2 of Dsub 9P connector. A site shows pin assignment of Dsub 9P. It means to use a straight RS232 cable. I checked whether my cable can apply by tester. The table shows the connection. Tektronix's DSO connects cross. I made the cable for Dsub 25P to connect DSO with 66MHz PC before. Akizuki's circuit is NC for P1, P7, P8 and P9. It connects P4 with P6.
I had assembled my test circuit board for AKI-3664 flat microprocessor unit kit. A resistor with 6 color bands is on
the board. How do you read the color code? The last band is coefficient of temperature.
I copied a test program to communicate PC from Ref . I built it by GDL. I booted AKI-3664 with a reset SW and a push SW on. I had fixed them for reset, shortening JP2 and JP3 on my base board. I added hyper terminal of Windows 98 from CDROM. I set up COM1 port, and property of the port are 38400bps, none flow control. The others are default by hyper terminal. The microprocessor board replied the same characters, when I inputed them. I can program AKI-3664 now at last.
Check receiving buffer
Check transmitting buffer
Clear receiving buffer
Clear transmitting buffer
Transmit one byte
Transmit text(null termination)
Transmit binary string
Read a character
Best Technology offers some usuful functions about RS232 communication. The table shows them.
I will have to think the code to program for my purpose. I think that we should comment in roma-ji or alphabet, considering globalization. We, Japanese programmers owed source programs commented in English for long time.
H83664 has 4 A/D data registers ( ADDRA, ADDRB, ADDRC, ADDRD ). So it can get 4 results of A/D at once, when scan mode works. ADCSR is A/D Control Status Register. 0x38 ( 00111000 ) means that CKS ( ClocK Seclect ) and SCAN are on, ADIE and ADF are off. I knew that A/D interrupt enable ADIE is disable and A/D flag ADF is off at start. A/D converts fast (70 states ), when CKS is on.3664.h initializes serial comunication interface SCI3 simply in a function call. It seems to be difficult for me to program SCI3, reading H83664 hardware manual. GDL shows a few source codes to control SCI3 in sci.c.
SCI3.SCR3.BYTE = SCI3.SMR.BYTE = 0;
As for SCR3 register, I do not know well. An infinite loop in the above A/D converting sample program is very useful
to apply for measurements of photo cells. I had better not use different groups of AN0 and AN4 at the same time,
because the both channels use the same register ADDRA.
A/D CONV = 1016
A/D CONV = 1017
A/D CONV = 1023
210 -1 = 1023The AKI-H8/3664F has worked well with two solar cells and two kinds of temperature sensors as well as DSO TDS310 did. CNET Download.com and Vector puplished Slip21 for WinXP/7. Slip21 includes RS232 and A/D program writing to the MCU by flash ROM writer. I also publish the circuit drawing of the MCU with mother board.
Flash Writer 5.0 does not write my mot file to the target of H8/3664F now. GDL equips another flash writer FlashSimple. I ran it and FlashSimple showed a lot of warning messages. It seems to be able to communicate with PC at 38400bps, judging from Changing baud rate to 38400 bps of FlashSimple output. It is reasonable because the last program can communicate with PC.
AK-H8/3664F manual sheet says, 'can write more than 100 times'. I wrote less than 10 times in August 2012. I also wrote less than 10 times a few years ago. But I bought it several years ago. The life of writing times decreases in a long time, does it? Strange. However, I knew that FlashSimple can diagnose the writing status.
I was wrong. I changed a part to boot correct. SimpleFlash can write to my
target now. I should have read the H8/3664F manual carefully.
11:11 Sep27 GMT+9
I measured current comsumption of AKI-H8/3664F with my addtional circuit while running. Sanwa PC510 indicated 17mA and 35mA at the range of A and mA each. Power LED always lights, when power switch turns on. The VF is 1.928V. The current of the LED is,
(5-1.928)/0.068 = 4.5mATherefore, The AKI-H8/3664F board works at 12mA at 5VDC.
 0 to 10.23[V] denatsukei ni shitemiru
 H8/3664 ni kahenteikou wo setsuzokusi, denatsu no henka(0 to5[V]) wo 10bit no bunkainou de PC ni soushinsuru
 3664F,3694F de hajimeru H8
 GCC Developer Lite han no riten
 Heisha CPU kibanyou program kaihatsu kankyou, kakushu download
 RS232C (EIA-574 no pin wariate)
 GCC Inline Assembler
 H83664 hardware manual, p58
 H83664 hardware manual, p88
 H83664 hardware manual, p148
 AKIZUKI DENSHI TSUSHO CO.,LTD.