Hello Qingyuan Meng,
Do you need that 8-bit data in the MCU pins or do you need to send it to another peripheral?
If you want the 8-bit data in the MCU pins you need to configure those pins as GPIO output which is pretty simple, you can see a detailed description in the post Re: Port configuration.
You can set or clear more than one pin with one simple instruction by writing in the GPIOx_PSOR or GPIOx_PCOR registers.
The FRDM-K64F has routed the port D from the pins 0 to 7 to the headers so it is a good choice.
Best regards,
Earl Orlando.
/* If this post answers your question please click over the Correct Answer button. */