// C64 Emulator, works with pic32MX and pic32MZ (SDZL board) under UECIDE
// Pito’s version, July 2014
// Works with STM32F407 Discovery, under STM32duino
// Pito March 2016
but i can’t see the serial output, i tried open pin usart map in discovery_f4.h
#define BOARD_USART1_TX_PIN Port2Pin(‘A’, 9)
#define BOARD_USART1_RX_PIN Port2Pin(‘A’,10)
#define BOARD_USART2_TX_PIN Port2Pin(‘A’, 2)
#define BOARD_USART2_RX_PIN Port2Pin(‘A’, 3)
#define BOARD_USART3_TX_PIN Port2Pin(‘D’, 8)
#define BOARD_USART3_RX_PIN Port2Pin(‘D’, 9)
#define BOARD_UART4_TX_PIN Port2Pin(‘C’,10)
#define BOARD_UART4_RX_PIN Port2Pin(‘C’,11)
#define BOARD_UART5_TX_PIN Port2Pin(‘C’,12)
#define BOARD_UART5_RX_PIN Port2Pin(‘D’, 2)
i tried in those pin , but not result i get in my serial, anyone have suggestion? or have done about that problem too?
and also this stm32f4 discovery supported pwm write already?
thnnk
void setup () {
Serial1.begin (921600);void setup() {
// put your setup code here, to run once:
Serial1.begin (921600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial1.println(“hello world”);
}
but i get in terminal :
èìò÷olèdr÷ïlhdr÷ïlhärw leäòï ïìhlï ìedlo ìldìo olèìo÷olhìr÷ïìhärwïìåärwïleäòwoìedòooìedlo ìeèdò÷ìlhìï ïlhìïwlìhlrwïìhäòwoìeäòw ìedò÷ ìedro ìåhìo ìlhrï
i change to Serial1.write(“hello world”); but also i got same result,
inything i do wrong guys?
Serial1.begin (921600);
In the C64 example we simulate “C64 video screen” on a VT100 terminal, so you transmit content of the emulator’s video buffer via serial to a terminal (ie the TeraTerm). Thus you need a fast tx out of the F4 (and almost no need for a fifo). The rx into F4 comes from your “keyboard”, I can hardly imagine you can overrun the rx fifo (if any) by typing in..
p.
It normally indicates that your receiving device is configured to a much higher baud rate than your transmitting device.
try increasing the transmission baud rate to 38400 or higher and see what you get at the other end.
I have not tried hardware serial on the F4, so I cant absolutely confirm whether it works or not.
The OP made a correction
Their baud rate is just 9600 not nearly 1M
srp
this is the result:
serial =usart 1 port A9,A10 = error(output not recognized)
serial 1=usart 2 port c6,c7 = ok
serial 2=usart 3 port d86,d9 = ok
serial 3=usart 4 port c10,c11 = ok
serial 4=uart 5 port c12,d2 = ok
thanks
The OP made a correction
Their baud rate is just 9600 not nearly 1M
srp
STM32F4Discovery kit.
Serial1 on PA2 and PA3 (the marking on the pcb). Serial1 set to 921600.
The source as in my C64 emulator topic.
Works fine – terminal is the TeraTerm under win7, size set to 40×25 (C64 screen).
C64 screen.JPG

