Was bored so decided to finally use this STM8S dev board. It works well. I just have to read up on it more to determine actual speed of MCU…
Here is my Code and Pictures… CODE
i´m an old boy (54)from germany. I have ordered the STM8s Kit. Your lib is cool. I will try this with a 20*4 Display.
I got the Kit yesterday and today the display is working! Thanks for your work!
Glad to hear that… im going to be making boards for this kit soon.
I might drop it tho… moving to PIC and AVR only now…
Thanks for your library! You saved me a couple of hours 🙂
No problem, Glad i could help out! Nice site by the way!
Does anyone tryed the STM8L-Discovery(LCD on the board) ? This is the Ultra low power version of this kit.
Thanks a lot.
Thank you for your code.
I want to know just what is the
component US2 between GND and VDD.
Its a POT i think i used a 1k (trimmer pot)
this code that you posted works when compiling? i am getting 3 errors.. also how does this code work without using #include stm8s_gpio.h? i am using raisonance btw.
*** ERROR C104 IN LINE 50 OF main.c : Invalid parameter declaration for ‘LCD_DATA’
*** ERROR C077 IN LINE 52 OF main.c : Invalid expression syntax
*** ERROR C077 IN LINE 53 OF main.c : Invalid expression syntax
I havent played with this in a LONG LONG time. If it works for everyone and not you it has to be something your doing… not to sound like a jerk tho. Um.. maybe you can goto the forums i goto and ask for some help 🙂
I’ve been working on converting your code over for the STM8L. There aren’t too many differences but I did want to poke back here to post a solution to this problem. I know that its a bit late for Will, but this may be able to help someone else. Also worth mentioning, I am compiling using raisonance.
With the error: Invalid parameter declaration for ‘LCD_DATA’
The variable names that are being used cause some issues with the raisonance compiler. Simply change the names of variables ‘data’ and ‘type’. So I did a “Find and Replace” to change ‘data’ to varData’ and ‘type’ to ‘varType’.
Also to anyone else converting to STM8L:
Remember that some defines are not all caps, so for example ‘GPIO_PIN_ALL’ would be ‘GPIO_Pin_All’
You will also need to replace all occurrences of:
because these are not defined in the STM8L firmware provided. I got around this by defining at the top of main:
#define GPIO_HIGH(a,b) a->ODR|=b
#define GPIO_LOW(a,b) a->ODR&=~b
I then changed all of the ‘GPIO_WriteLow’ and ‘GPIO_WriteHigh’ occurrences accordingly.
I am further mutilating the code to work in 8-bit mode, when I’m finished I will post back here with a link. Thanks for sharing your code for this project Atomsoft. This has been a fantastic starting point for me to learn from!
After some thought I realize that the 8-bit version of this may not be great for everyone, as 4-bit mode is rather popular.
If you like, Atomsoft, you could email me and I will send you a txt of the version for a 4-bit STM8L interface for your visitors. Its the least I can do seeing that you have already done most of the work for us. I would post it in the comments section here but it seems like that would just be a big unformatted mess. Hopefully WordPress allows you to see my email address, if not post back and we can work something out.
WordPress does Nick, i just emailed you and thanks again 🙂
hmm.. well were you using the raisonance toolchain? and was main.c and stm8s.h the ONLY two files used in your project? i am probably just forgetting something dumb.. i am pretty new to this
I want to make a program that is triggered if there ‘s an event on PIN_7 (GPIOB)
I made a wired connection between PIN_7 (GPIOB) and PIN_3 (GPIOB) to test
I tried with this code but it does not work
GPIO_Init(GPIOD, GPIO_PIN_0, GPIO_MODE_OUT_PP_LOW_FAST);
GPIO_Init(GPIOB, GPIO_PIN_3, GPIO_MODE_OUT_PP_LOW_FAST);
GPIO_Init(GPIOB, GPIO_PIN_7, GPIO_MODE_IN_PU_NO_IT);
// i wille connect GPIOB, GPIO_PIN_3 with GPIO_PIN_7 to test
if ((GPIO_ReadInputData(GPIOB) & GPIO_PIN_7)== (u8)0x00)
for (d = 0; d < 10000; ++d)
can you give me a solution
sorry, I made a mistake with the pins.
it works now
Please atomsoft can you help me to programming LCD 2×16 on STM32VL Discovery ??
Please log in using one of these methods to post your comment:
You are commenting using your WordPress.com account.
( Log Out /
You are commenting using your Google+ account.
( Log Out /
You are commenting using your Twitter account.
( Log Out /
You are commenting using your Facebook account.
( Log Out /
Connecting to %s
Notify me of new comments via email.
Notify me of new posts via email.