Posted by carlos i put your program in my micro and it don't work too, so i don't know why. the question is that in the icc8h manual it say that you can write on the output with the command "sfr" but it don't run. if you have a other solution please tell me. thank very much
![]()
on July 31, 2003, 14:02:56, in reply to "Re: why it don't work"
62.151.151.220
hi mate,
--Previous Message--
: Hi,
: I think P6 Data register and control
: register addresses are swapped.
: Can you try following LED Blinking
: program ? It works on EVB3644F.
: Regards,
: Yash
:
: /************************************************************/
: #define P6CR (*(volatile
: char *)(0xffe9))
: #define P6DR (*(volatile
: char *)(0xffd9))
: int userdelay = 10;
: int count = 0;
: void dummy (void)
: {
: }
: void somewhere (int x)
: {
: count += x;
: }
: void sleep (int delay)
: {
: int i,j;
: for (j = 0; j < 1000; j++)
: for (i=0; i<delay; i++)
: dummy();
: }
:
: void main (void)
: {
: int i, j =0;
: P6CR |= 0x01; /* Set bit 0
: for output */
: while (1)
: {
: somewhere (j++);
: for (i = 0; i < 10; i++)
: {
: /* Toggle the light */
: P6DR ^= 0x01;
: sleep (userdelay);
: }
: }
: }
:
: /************************************************************/
: --Previous Message--
: it is my fist program with a hitachi
: h8/3644 and i want to turn on an off
: a pair of led.
: but it don't work and i think it is
: well done.
: #include <inh8.h>
: #include <ioh83644.h>
: #pragma language=extended
: sfr PC6 = 0xffffffD9;
: sfr PORT6 = 0xffffffE9;
: void main()
: {
: char tope;
: char i;
: set_interrupt_mask (2);
: PC6 = 0X03;
: tope=1000;
:
: PORT6 = 1;
:
: for (i=0;i<tope;i++);
: PORT6 = 2;
:
: for (i=0;i<tope;i++);
: PORT6 = 3;
: }
: can someone tell me what is the
: problem?
: thank, merci, danke , gracias
: :
:
:
Message Thread:
![]()
« Back to thread
Evaluation Kit Support
Renesas Evaluation Boards are intended for evaluation of Renesas microprocessors only, not as development tools.